There are five important things to know about HTML tags:



  1. Tags are always surrounded with angle brackets (less-than/greater-than characters)--for example, <HEAD> or <I>.

  2. Most tags come in pairs and surround the material they affect. They work like a light switch: the first tag turns the action on,and the second turns it off. (There are some exceptions. For instance, the <P> tag creates paragraphs and doesn't have an "off switch." Once you've made a paragraph, you can't "unmake" it.)

  3. The second tag--the "off switch"--always starts with a forward slash. For example, you turn on bold with <B>, shout your piece, and go back to regular text with </B>.

  4. First tag on, last tag off. Tags are embedded, so if you try, for instance, to do this: <HEAD> <TITLE> Your text </HEAD> </TITLE> it won't work. The correct order is <HEAD> <TITLE>Your text</TITLE></HEAD>.

  5. Many tags have optional attributes that use values to modify the tag's behavior. The <P> tag's ALIGN attribute, for instance, lets you change the default (left) paragraph alignment. For example, <P ALIGN=CENTER> centers the paragraph following it.

Remember, too, that HTML is a constantly changing language, and older browsers often don't support the newest tags. When a browser sees an HTML tag it doesn't understand, it tends to ignore both the tag and the material the tag affects. This is nice because you can add new, innovative elements to your page for viewers with newer browsers to see without causing problems for viewers with older browsers; they'll simply see the elements their browser understands. On the downside, if you've made a coding mistake, you won't necessarily see an error message or other red flag--so you may not realize you've made an error at all. Thus, it's important to check all of your pages in a browser to make sure everything looks the way you intended.


Back to the Tutor Index