
To edit the file once again, you need to right-click, select “Open With” and choose TextEdit from the options.įinally, 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. Files saved as HTML will be associated with the web browser (Safari, by default).
txt as the file extension by default if none is provided.
When you save an HTML file, make sure you provide the extension –. Once you’ve set up TextEdit to save and open plain text files, you can start coding HTML. 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. You’ll notice that there is no rich-text toolbar at the top and the font is monospace.īy the way, on my Macbook, the font used for plain text is Menlo Regular at point size 11. Launch the app once again to get a barebones editor. You can use the Command + Q keyboard shortcut. Thus, I have a structure like this: pinkmutant (folder) articles.html (file) mainb.css (file) articles (sub-folder) snowleo1.html (file) Both articles.html and snowleo1.html use the same mainb.css style sheet. 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. If you use it as separate file, then the link in the html must point to the location of the css file. 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.
Under the “New Document” tab, select the “Plain text” radio button. TextEdit is a reasonably decent text editing app that has been bundled along with just about every version of OS X since the beginning. Here you’ll find two tabs – “New Document” and “Open and Save”. How to use textedit as html how to#
How to open and save plain text files in TextEdit 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.
However, by default, TextEdit opens and saves files in rich-text format.