A Web page is a text file that is served over the network. It contains special mark-up characters and sequences that control the formatting and other attributes that are interpreted by the viewer (browser) on the receiving computer. The Web page must be in ASCII format (text only), and it must have a .html extension (or .htm).

Required Elements
Very little is actually required of a Web page, beyond being an ascii file with the .html extension. By convention, however, the text is enclosed within a header section and a footer section that is setup like the following example:

<html>
<head>
<title>Page Name</title>
</head>
<body>

The body of the page is inserted here. Special formatting characters associated with text display, image display, and hypertext linking will be covered later.

</body>
</html>

Example Page

Practice by creating a simple web page with text about yourself. Note that anything located between a < and a > is not displayed. These are read by the browser as formatting codes. If a code is not corretly enclosed, it will be displayed as text and not coded properly. Therefore, make sure all of your codes are correctly enclosed.

How HTML Files are Read and Interpreted
New webmasters will soon realize that HTML is written very differently from typing a word processor document. A hypertext file does not recognize returns or spaces entered from the keyboard. The author relies on codes for this type of functionality.

HTML code is not written on a line-by-line basis. (This is a common mistake.) That is, one code at the beginning of a page continues throughout the entire page until a stop code is encountered. For example to make all of the text on a page red, the code would look like:

<font color="red">
Text
Text
Text
Text
Text

Text
Text
Text
Text
Text
Text
</font>

Not:

<font color="red"> Text </font>
<font color="red"> Text </font>
<font color="red"> Text </font>
<font color="red"> Text </font>

<font color="red"> Text </font>
<font color="red"> Text </font>

In other words, code does not have to be repeated for each line or paragraph in most cases.

Previewing the File on Your Local Computer
Web browsers can view files that are fetched from the network or from the local hard disk or floppy drive. You must quickly learn to write a file, save it as a text file with the .html extension, and view the file by using the Open File command on the Netscape menu bar. You can identify simple errors in page construction quickly, and correct them before you send your file to the server.

Transferring the File to the Serving Computer
The previewed and edited file is then transferred to the server.

NOTE: Computers operating under Windows 3.1 allow only 8 character file names with 3 letter extensions. You may have to rename your file once it is transferred to the server if you sent it from a Windows 3.1 machine.

LESSON 4


WebMasters was created and is taught by Dr. Dan Lineberger, WebMaster of Aggie Horticulture, Department of Horticultural Sciences, Texas A&M University, College Station, Texas 77843.