Iowa State University Extension

Learning HTML
Lesson 1 -- Using Text Editors, Netscape, and How Spacing Effects HTML

Start your text editor (Notepad/TeachText) and enter the text that is shown between the two horizontal lines below. Be sure to include the extra spaces and line breaks.

bluemarble line

This is a sample.
 
The first thing to learn is that spaces and breaks
don't     make      a difference    when    displayed.

bluemarble line

  • Save the file on the floppy disk as "sample1.html".
  • Start up Netscape (you shouldn't need to exit the text editor).
  • Under the File menu select Open File...
  • Open the file from the floppy disk. If you are using Windows 95, and the file is automatically renamed to "sample1.html.txt" then you need to set up a .html filetype.

What am I supposed to see? sample1.html [VIEW]

  • Notice that all of the text is compressed into a single paragraph, extra spaces are gone, and line breaks are translated into one space.
  • Spacing doesn't make a difference to the browser. As always, there are exceptions to this rule, but for the most part, spacing is only used to make the HTML code easier for you, the author, to read.
  • If you have a document where spacing is important, then you should explore using the <PRE> tag. However, unless it is absolutely necessary, you should let the browser do its job and format the page for the viewer.

Side note...

[VIEW]

When you see this button, you can click it to see the sample code displayed as written. We strongly encourage you to take the time to enter each sample on your own. Typing the tags will help you remember them.
thin red line
 ISU Extension maroon bullet Learning HTML maroon bullet Feedback maroon bullet Next Lesson
thin red line

Last Update: August 16, 1999
Contact: ISU Extension Training Team (
eittrain@iastate.edu)