Mac OS X comes with a text editor,
TextEdit, that lets you create web pages. Although
TextEdit is not an advanced HTML editor and it won't
help you create a complex web page if you don't know
HTML, TextEdit can be used for typing or editing HTML
code.
You can create new HTML documents using either plain
text or rich text format. If you use rich text format,
your code may be easier to read, but when you save it
as an HTML file, TextEdit will add extra (and
unnecessary) code to your document. On the other hand,
if you use plain text, you will have to make some
adjustments on the Save pane when saving the document,
but no extra code will be added to the document.
The TextEdit Preferences Pane gives you control over
your HTML documents by letting you set the document
type, styling and encoding. To view your options, open
the Open and Save Preferences Pane.

First, you need to select the HTML document type. Click the button next to Document Type and a drop-down menu will appear. You have four options for how your document can be saved: HTML 4.01 Strict, HTML 4.01 Transitional, XHTML 1.0 Strict, and XHTML 1.0 Transitional. The HTML declarations are older formats while the XHTML formats are newer and becoming the standard. The strict formats allow less flexibility so if you are unsure of which document type to use, it is probably best to select the XHTML Transitional or the HTML 4.01 Transitional type.
Many web designers like to use style sheets to control formatting of their web pages, and TextEdit lets you use embedded or inline style sheets. Click the button next to Styling and a drop-down menu will appear with three options for CSS style sheets:
The third option for HTML documents is the type of encoding that is used when saving an HTML document. Click the button next to Encoding and you will see a list of encoding options. If you are not sure which encoding to use, select the Unicode (UTF-8) option since this is a type commonly used for HTML documents.
After you have finished creating your HTML document, select Save As... from the File menu. A Mac OS X 10.5 Finder save pane will open and you can name your file and select a location for it on your hard drive. The next steps will vary depending on whether your document is in rich text or plain text format:
