TextEdit Icon

Working with HTML in TextEdit

You can use TextEdit as an HTML editor. You can start from a new plain text or RTF file, or you can edit content in an existing HTML file.

When you create a document that contains embedded graphics, you can save it as a Web Archive file. Plain text and RTF files can be saved as HTML. You can open and edit these files in TextEdit, and you can view them in a web browser, such as Safari.

To create plain HTML code files:

  1. Create a new text document and choose Format > Make Plain Text.
  2. Write the HTML code.
  3. To save your file, choose File > Save. Use the extension ".html" at the end of the filename. Click Save.
  4. If you want to work with an existing HTML file, choose File > Open and select the file you want. Be sure to select "Ignore rich text commands." When you save the file, it remains a ".html" file.

See also

HTML