Turn TextEdit Into an HTML Source Viewer with a Simple Settings Change

Jan 14, 2013 - 2 Comments

TextEdit is a reasonably decent text editing app that has been bundled along with just about every version of OS X since the beginning. If you’ve ever opened an HTML file with TextEdit you have probably discovered the app actually renders the HTML code, displaying the formatted text, rather than displaying the source itself. This is actually really simple to adjust, and all it takes is a settings change to turn TextEdit into an HTML code viewer rather, and as a side effect, a simple plain text code editor.

  • Open TextEdit and pull down the TextEdit menu to select Preferences
  • Click the “Open and Save” tab and check the box next to “Display HTML files as HTML code instead of formatted text”

TextEdit View HTML Source Code

Open any HTML document into TextEdit to see the new document code and source view in place of rendered code.

View HTML Source with TextEdit

The default font size for plain text documents like HTML is set to 11, which can be very small for some resolutions and screens like the 11.6″ MacBook Air. Extend the readability by adjusting that through “Preferences” and under the “New Document” tab click “Change” alongside the ‘Plain text font’ option – Menlo Regular 12 is quite a bit more readable, but adjust it as your eyes see fit.

Developers will find this is infinitely better than the default rendered HTML view, but it doesn’t offer syntax highlighting and other powerful features that those who work with the web generally need. If you’re serious about viewing source or changing code of any kind, do yourself a huge favor and download TextWrangler, it is by far the best free text editor for the Mac platform, it has syntax highlighting and SFTP support along with tons of other features, and it’s completely free.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: William Pearson in Mac OS X, Tips & Tricks

2 Comments

» Comments RSS Feed

  1. Gee Deezy says:

    Might be a Mountain Lion specific option.

    In Lion, the option is
    “Display HTML files as HTML code instead of formatted text” not what you have shown.

  2. Cosmin C says:

    I would say SublimeText2 is BY FAR the best text editor, on ALL platforms !!

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates