Web Development

Required HTML tags

There are certain tags you need to put in every HTML document to set it up as a Web page. Here's a look at some required HTML tags.

By Fred Dekker and Donald St. John

After covering the rules of HTML, we're ready to start coding. To illustrate just what HTML code does, we're going to build a simple page for the fictitious company E-Z Accounting.

There are certain tags you need to put in every HTML document to set it up as a Web page. Begin by opening a new document in your text editor.

<HTML> is the first tag to appear on every Web page. Add the opening and closing tags to your page like this:

<HTML>
</HTML>

All of the page's code will be placed between these two tags, which tell a Web browser it's reading an HTML document.

Below the opening <HTML> tag, enter the <HEAD> tag, which contains information about the document but doesn't appear on the Web page. Your document should now look like this:

<HTML>
<HEAD>
</HEAD>
</HTML>

There are several tags that can go between <HEAD> tags--for example, you'll regularly come across <META> tags that help search engines categorize pages--but the only tag that's required is the <TITLE> tag, which puts text in the browser's title bar. Your document should now resemble the example below (remember: First on, last off):

<HTML>
<HEAD>
<TITLE>E-Z Accounting
</TITLE>
</HEAD>
</HTML>

Now you're ready to add opening and closing <BODY> tags. Your document should now look like this:

<HTML>
<HEAD>
<TITLE>E-Z Accounting
</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>

Everything that appears inside the Web page will go between the <BODY> tags.

You'll see the name "E-Z Accounting" in the browser's title bar above a blank page. Now save your file in text format with the filename index.html (or index.htm if you're still using Windows 3.1).

Fred Dekker is one of the Founders of The H.E.L.P. Community, an online resource for beginning Webmasters.

Donald St. John was the founding Webmaster at PC Games magazine.

0 comments

Editor's Picks