Creating simple HTML files in Mac OS X with TextEdit...

Joined
Aug 5, 2008
Messages
29
Reaction score
0
Points
1
In Windows, I was able to pull up Notepad, input some raw HTML code, and save the file with the .htm (or .html) extension. And I had an HTML file that would open in my browser. I CANNOT get this to work in Mac OS X Snow Leopard in TextEdit, even though I've consulted something like 3-4 online tutorials that purport to show you how to do just that. The file ALWAYS opens back up as a text file (albeit with some formatting...thanks a LOT, TextEdit)! Any suggestions? Is there an application I can download that will allow me to do things like this? I'm desperate :\
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
TextEdit differs from Notepad in one significant way - Notepad is plain text, TextEdit is rich text. When you save a file as rich text, the file is saved with much more content than you put in your document. This content defines how the document looks - you'll notice that in TextEdit, you can change the font, change colours, etc. This is because it is rich text and not plain text which is, well, just plain.

You can have TextEdit work in plain text mode if you'd like. Go to Format > Make Plain Text. When the file is saved, it will save as plain text, much like Notepad does.
 
OP
A
Joined
Aug 5, 2008
Messages
29
Reaction score
0
Points
1
TextEdit differs from Notepad in one significant way - Notepad is plain text, TextEdit is rich text. When you save a file as rich text, the file is saved with much more content than you put in your document. This content defines how the document looks - you'll notice that in TextEdit, you can change the font, change colours, etc. This is because it is rich text and not plain text which is, well, just plain.

You can have TextEdit work in plain text mode if you'd like. Go to Format > Make Plain Text. When the file is saved, it will save as plain text, much like Notepad does.

Thanks for the response. I'll try to work with that.

I've just noticed that another problem is that if I try to do plain-text editing of existing HTML files on my Mac, right-clicking and opening them with TextEdit fails to pull up the HTML code - it just shows me a crappy version of the website. Any way around *that*?
 
Joined
Mar 30, 2004
Messages
4,744
Reaction score
381
Points
83
Location
USA
Your Mac's Specs
12" Apple PowerBook G4 (1.5GHz)
Yes. Don't ever, ever, ever use TextEdit for anything, ever.

Get a good text editor, like TextWrangler, for plain text editing.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
There are quite a few HTML editors for the Mac. Even general programmer's editors like TextWrangler will do the job if you like editors that stay out of your way. One that is quite popular is TextMate as well - I don't use it but many people will swear by it.
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
I think what confuses most switchers is the name "TextEdit" as it assumes it's a plain text editor similar to the Windows Notepad. While actually TextEdit is really more like the Windows "WordPad" which is also a Rich Text Document editor.
 
Joined
Mar 30, 2004
Messages
4,744
Reaction score
381
Points
83
Location
USA
Your Mac's Specs
12" Apple PowerBook G4 (1.5GHz)
I think what confuses most switchers is the name "TextEdit" as it assumes it's a plain text editor similar to the Windows Notepad. While actually TextEdit is really more like the Windows "WordPad" which is also a Rich Text Document editor.

It's actually a lousy text editor, a pathetic word processor, and a worthless WYSIWYG HTML editor...all in one. Very likely the worst application Apple...or, rather, NeXT...has ever designed.

Jack of all trades, useful at none.
 
Joined
Feb 1, 2011
Messages
4,407
Reaction score
2,098
Points
113
Location
Sacramento, California
In Windows, I was able to pull up Notepad, input some raw HTML code, and save the file with the .htm (or .html) extension.

If you are working with HTML, you would do well to get a better text editor, or, even better, a text editor that includes lots of features to make HTML coding go faster.

A better, yet still free text editor:

TextWrangler (free)
Bare Bones Software | TextWrangler

This one is a longtime favorite of hand coders:

BBEdit ($100)
Bare Bones Software | BBEdit 9

This is my personal favorite for hand coding HTML:

PageSpinner ($30)
PageSpinner - the HTML editor for Mac OS X

Other choices:

CODA ($99)
Panic - Coda - One-Window Web Development for Mac OS X

ESPRESSO ($80)
MacRabbit - Espresso

However, you might want to use a WYSIWYG Web site creation program instead, or just occasionally for quick jobs. There are a bunch of these for the Macintosh; all of them are good. But here is my favorite, and it is FREE:

KOMPOZER (free and open source)
http://kompozer.net/
Kompozer is a very impressive application. It is more like DreamWeaver than iWeb, but it is very easy to use. In fact, it is almost as powerful as a professional-level Web site creation tool. There are several free tutorials to learn how to use the program, and it isn't hard to learn to use. You can easily migrate your existing Web site(s) to Kompozer because it doesn't use a proprietary format, it will simply open your HTML-based Web site.

FREE KompoZer tutorials:

- KompoZer User Guide
KompoZer User Guide - Home

- How to Design and Publish Your Website with KompoZer
How to Design and Publish Your Website with KompoZer (thesitewizard.com)

- KompoZer Tutorial 2: How to Add Images, Change Fonts and Colours
Tutorial on designing and publishing your web pages with KompoZer, a free standalone WYSIWYG web editor.
KompoZer Tutorial 2: How to Add Images, Change Fonts and Colours and Create Links (thesitewizard.com)

- Other free KompoZer tutorials
thesitewizard.com: Website design, promotion, CGI, PHP, JavaScript scripting, and revenue earning.
Scroll down to KompoZer Tutorials

- KompoZer Video Tutorials
YouTube - kompozer tutorial


___________________________________________

Randy B. Singer
Co-author of The Macintosh Bible (4th, 5th, and 6th editions)

Macintosh OS X Routine Maintenance
OS X Maintenance And Troubleshooting
___________________________________________
 
Joined
Mar 30, 2012
Messages
1
Reaction score
0
Points
1
Warning -- don't ever tell this useless program to save in plain text after it stupidly opens like a rich text file. You will lose everything, like the javascript you just spent an hour working on :Shouting::Shouting::Shouting:

slightly off-topic, I don't suppose mac saves versions of files you can get at after it does this? I'm a new (and fairly frustrated) mac user after years of Linux and Windows.
 
Joined
Oct 22, 2007
Messages
8,967
Reaction score
287
Points
83
Location
London
Your Mac's Specs
Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver
See above, there a links to text Wrangler which is a great html and javascript editor
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
If you're using Lion, you can browse previous versions of the current file. Click the little down arrow next to the file name in the titlebar. You'll have to mouse over the file name to see it. When you do, select "Browse All Versions..."
 
C

chas_m

Guest
If you're using Lion, you can browse previous versions of the current file. Click the little down arrow next to the file name in the titlebar. You'll have to mouse over the file name to see it. When you do, select "Browse All Versions..."

Yes, let's see TextWrangler manage THAT and then I'll be impressed.
 
Joined
Feb 1, 2011
Messages
4,407
Reaction score
2,098
Points
113
Location
Sacramento, California

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top