I teach 109

I'm Luke, I teach CMPT-109 at Montclair State University and this is my blog.

Using TexEdit for Webdesign


When working on the HTML lab and your final project you will be required to create HTML websites. For that you will need a plain text editor. Note that if you think that the words “plain text editor” describe Microsoft Word you have failed to learn one of the most important concepts covered in the first three labs. Please go back and review your notes to understand why Word cannot be considered a plain text editor.

On Windows the default plain text editor is Notepad. There are much better editors out there (a lot of them specifically created for writing code) but for our purposes it will work just fine.

If you are a mac user, you can use TextEdit. However, TextEdit has a huge flaw: by default it opens HTML files in WYSIWYG mode making it no better than Microsoft Word and completely unusable for our lab. Fortunately, unlike Word, this feature can be disabled in TextEdit.

To configure TextEdit for this lab, open it and go to TextEdit->Preferences on the menu and follow these steps:

  • Switch to Open and Save tab
  • Check the Display HTML files as HTML code box
  • Un-check the Add “.txt” extension to plain text files box

TextEdit Setup: Open and Save

  • Switch to the New Document tab
  • Under the Format section choose Plain Text
  • Under the Options section, make sure the following boxes are un-checked:
    • Smart quotes
    • Smart dashes
    • Smart links

TextEdit Setup: New Document

From this point on, when you open up HTML files you should see the HTML code. When you start a new HTML file you should be able to save it without corrupting it.

Please do not try to be clever and think you can just skip this step and create your websites in the WYSIWYG mode. The HTML auto-generated by TextEdit going to be much worse than anything you could ever write by hand. Not only that, but it saves files in HTML4 Strict mode and we will be using HTML5. The difference will be glaringly obvious and I will need merely a single glance on your code.

Submitting HTML4 documents generated by TextEdit will result in an automatic grade of 0 for failure to follow explicit instructions.