How do I change TextEdit to a plain text editor for HTML files?

How do I change TextEdit to a plain text editor for HTML files? cover image
  1. Home
  2. How Do I
  3. How do I change TextEdit to a plain text editor for HTML files?

Call me old school, but I feel all budding web developers should know how to write HTML (and CSS, Javascript etc.). Even though creating web sites has become really simple nowadays with tons of WYSIWYG tools, WordPress’s visual and other such editors, it’s always a good idea to learn things from scratch so that you have a strong foundation in your field.

Windows users have their trusted Notepad – a program I had used all these years to write HTML. On the Mac there is TextEdit.

Sponsored Links

However, by default, TextEdit opens and saves files in rich-text format. In this post, I shall detail how one can change the app settings so that it becomes a plain text editor, quite like Notepad of Windows.

How to open and save plain text files in TextEdit

  1. Launch TextEdit
  2. Open “Preferences”. Here you’ll find two tabs – “New Document” and “Open and Save”.
  3. Under the “New Document” tab, select the “Plain text” radio button.
    Check option of Plain Text
  4. Now move to the “Open and Save” tab and put a check mark at the “Display HTML files as HTML code instead of formatted text” box.
    Check option to display HTML files as HTML code instead of formatted text
  5. Close the Preferences window.
  6. Quit TextEdit completely. You can use the Command + Q keyboard shortcut.
  7. Launch the app once again to get a barebones editor. You’ll notice that there is no rich-text toolbar at the top and the font is monospace.

By the way, on my Macbook, the font used for plain text is Menlo Regular at point size 11. If you’ve shifted from Windows (like me) and want the familiar Courier (or Courier New), select it from Preferences… and you can even change the font size.

How to use TextEdit as an HTML editor

Once you’ve set up TextEdit to save and open plain text files, you can start coding HTML. However, here are a few points to note.

Finally, once you are tired of using TextEdit for HTML or simply find it cumbersome, there are plenty of great applications available (and some of them for free) to write and edit code.

How Do I Mac Web Development