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
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.
- When you save an HTML file, make sure you provide the extension – .html or .htm. On my Macbook, TextEdit will supply .txt as the file extension by default if none is provided.
- Files saved as HTML will be associated with the web browser (Safari, by default). To edit the file once again, you need to right-click, select “Open With” and choose TextEdit from the options.
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.