Web Page CentralPoliciesHTMLFAQPublishingBookletToolsLinks

Home :: Learning HTML :: Basic Structure

Search

[Help]
Match:

[Off Site Link]=Off Site Link[Help]

[Direct Link to File]=Link to File[Help]

Basic Structure

Every HTML document has a certain structure. We'll try not to get too technical yet. Just make sure every page you make contains the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Meaningful Title</TITLE>
</HEAD>

<BODY>

(This is where your document's content goes.)

</BODY>
</HTML>

In the Web Design course, we make a template called template.htm that looks very similar to the above snippet. This helps save time by eliminating all that typing. When starting a new page, just open template.htm and do a File | Save As... and give it your new page's file name.

<!DOCTYPE>

The first line is the "Document Type Declaration," or DTD. It basically says that the document is using HTML defined as HTML 3.2. By defining the DTD, you let validators and other programs know just what is meant by the HTML you use.

<HTML>

The second line lets any program that will read this document know that this is HTML and not some other language that uses brackets for tags.

<HEAD>

The <HEAD> element contains information about the document. Nothing that is in the <HEAD> will appear on your Web page.

<TITLE>

<TITLE> goes inside of <HEAD>. The text you put in <TITLE> will appear on the window containing your Web page (on graphical systems) and is used for Bookmark names, in a browser's History list and by search engines. The title should be descriptive and be able to stand alone; that is, if someone bookmarks your page, and then a week later sees the title in their bookmark list, they should be able to tell what the bookmark is for. For example, "MMSD Breakfast Menu" is much better that "Menu Page 1."

<BODY>

<BODY> contains the actual contents of your document. Everything you want to be on your page goes in the <BODY> element. All elements, except the ones listed above, go in <BODY>.

In the <BODY> tag, you can set various colors of the document. Find out how!

And that's it... that is the basic skeleton of an HTML document, upon which you build everything else.

Next: Block Level


Home:: Learning HTML :: Basic Structure

Home | Policies | HTML | FAQ
Publishing | Booklet | Tools | Links

Last Update: 2000-04-19
This Page's Address: http://www.madison.k12.wi.us/webpub/basics10.htm
District Home Page: http://www.madison.k12.wi.us
HTML Editor & Publisher: Chris Burch, cburch@madison.k12.wi.us
webmaster@madison.k12.wi.us