HTML Tags

Tag Structure:
When a web browser displays a page (such as the one you are reading now) it reads special codes from a text file. These codes are called "tags" and are marked by the < and > signs. The general format for a HTML tag is:

     <tag> text </tag>

 

As an example, the title for this section uses a font size tag to tell the browser how large to display the text:

     <font size="+3">HTML Tags</font size>

 

HTML tags can also instruct the web browser to make the text bold, italic, or underlined, or make it be a hyper link to another web page (in this case, a link to the main page).

All tags should have an ending tag, </tag>, containing the "/" slash character which instructs the web browser to stop "tagging" the text. Think of it this way: if you turn on the water, the faucet will continue to provide water until you stop the flow. If you omit the slash, the web browser will continue the tag for the rest of the text in your document.

 

Errors:
Thankfully, web browsers do not differentiate between upper or lower case. As such, <font size="+3">... </font size> is interpreted the same as <FONT SIZE="+3">... </FONT SIZE>.

Also, if you make a typographical error in HTML you will not get a "bomb" or "crash" the system as you would in computer programming. Instead, your web page will appear as though the HTML was written in a foreign language. It is generally easy to look at the HTML, find the error, and make the changes. However, your first time looking at entire page of "code" for a missing character can be intimidating if you create your pages in a What-You-See-Is-What-You-Get (WYSIWYG; pronounced why-see-wig) editor.

Furthermore, if the browser does understand a particular tag, it will just overlook that tag. So, if you place this incorrect tag in your code, the browser will only display the font size:

<faketag><font size="+3">HTML Tags</font size></faketag>

 

Index of topics next topic: List of HTML Tags