What is a Tag?

| Back | Home | Next |

HTML uses tags to format the web page. A tag is nothing more than a word or character that the browser recognizes, and causes something to happen on the page.

Tags are recognized by small brackets < and > placed around them. These are the only brackets recognized by HTML as opening and closing a tag.

<HTML>

Most tags work in pairs, that is they begin to format an object (text for example) and when the particular formatting is no longer needed, the tag is then closed. To close a tag, place a "/"inside the brackets just before the tag name to be closed.

<HEAD><TITLE>My First Web Page</TITLE></HEAD>

Notice above that the tag pair <TABLE></TABLE> is nested inside the <HEAD></HEAD> tag pair. Nesting requires that close each tag is the reverse order that it was opened. So, </TABLE> was must be closed before </HEAD> tag because <TABLE> was opened last. The last to be opened is the first to be closed.