About WordPad vs NotePad

A student writes the following question…

“When I write my code in Wordpad and save as an htm text document, it looks like one. But after I open it in the browser to see how it looks, the icon in the folder no longer says .htm and it appears to be a Firefox document.

Is that right? Or am I doing something I shouldn’t. I can reopen it by telling it to open in Wordpad, but the icon never looks like a text document again. “

That’s a great question. First, the Windows OS comes with two native programs for creating text files: Notepad, and Wordpad. NotePad allows us to create documents using simple ASCII characters, often referred to as “plain text.” You can see that by the default extension of .txt. WordPad in contrast saves its document using the .rtf extension (Rich Text Format). Rich text format includes codes that describe characters. For example, like with Word (.doc) or OpenOffice.org (.odt), the rtf format provides the ability to control the presentation of visible characters with invisible characters that control boldness, italics, underlines, margins, font-sizes, font-families, etc. Plain text does not include that type of information.

When we create HTML code by hand on a PC, we use NotePad. That’s because we do not want any characters entering our code that shouldn’t be there. HTML documents are created with ASCII or plain text and are OS and platform independent. A HTML document created on a PC can be edited and viewed on a Mac, Sun, Linux, or Unix installation.

In brief… edit in Notepad. Save with a .htm or .html extension instead of the default .txt extension. When you want to edit the file, open it in NotePad. When you want to view or “render” the file, open it in Firefox, Safari, Explorer, Chrome, Opera or any of the other web browsers.