Work with HTML documents in TextEdit on Mac

You can use TextEdit to edit or display HTML documents as you’d see them in a browser (images may not appear), or in code-editing mode.

Note: By default, curly quotes and em dashes are substituted for straight quotes and hyphens when editing HTML as formatted text. (Code-editing mode uses straight quotes and hyphens.) To learn how to change this preference, see Use curly quotation marks and em dashes automatically.