Learning HTML
Chapter 3 - More Basic HTML Tags

3.1 Document Tags (HEAD, TITLE, BODY)

In your first HTML document, you used the <HTML> </HTML> tags to indicate to the browser that this is an HTML document. These are tags that help structure your document, and there are some additional ones that separate information about your document from the actual content that is displayed in the browser window.

The basic use of these tags is:

   <HTML>

   <HEAD>
   <TITLE>  </TITLE>      
   </HEAD>

   <BODY>

   </BODY>
   </HTML>

The <HEAD> </HEAD> tags indicate a section of your HTML document that will not displayed in the browser window. A number of different elements can be placed between these tags, including JavaScript commands and META tags which are used to provide information such as keywords, author name, and a description of the contents. For now, we will look at one HTML tag that allows you to give your document a title.

Notice the bar at the top of this browser window. It should say Learning HTML - Chapter 3.1. That is the title of this particular document. If a document does not have a title, the browser will display the name and location of the file. Without a title, this document would have something like this displayed:

     http://www.bsimple.org/learnhtml/chap3/1.html

In addition to being displayed by browsers, titles are used by services like AltaVista which index documents on the World Wide Web. A title is an important and useful way to identify your document.

To include a title, add the following text at the beginning of your document after the <HTML> tag (substitute your name for "Paul"). Remember to use Alt-Tab or the Taskbar to switch back and forth from Notepad to this guide:


   <HEAD>
   <TITLE>Learning HTML - Paul's First Document</TITLE>  
   </HEAD>

The <BODY> </BODY> tags indicate the section of your HTML document that will be displayed in the browser window. If you do not include these tags, most browsers will still display the information properly. The <BODY> tag also allows you to set certain aspects of your document, including text and background colors.

In your document, add a <BODY> tag on a line after the </HEAD> tag. Then add a </BODY> tag at the end of the document right before the </HTML> tag.

Note: we will be making a number of changes to this document. They will all be viewed at the end of Part 3. If you want to see them as you go along, you just need to save the file in Notepad and then open it in Netscape. Go back to Part 2 if you want to review the instructions for doing this.


Learning HTML
www.dickinson.edu/~dempsey
Last updated 6/8/2001
Copyright © 2001 Paul Dempsey