Home : Basic HTML/CSS tutorial : Basic HTML : Tags
Simple tags
Boilerplate HTML
< Previous: Example


"Tags" - special words within triangle brackets (< >) are the basis of HTML markup.


A tag is a word or sequence of characters within triangle brackets. If you look at the source of the example given previously, you should see numerous tags.

For example, there is an <html>tag; a <title>tag; an <h1>tag; and so on.

Pairs of tags

You probably noticed that tags tend to occur in pairs. First there is a "title" tag, then after some text, there is a "/title" tag to match. The same pattern occurs with all the other tags in that example except the !doctype tag.

The tag name on its own (<title>) is an opening tag. With the / symbol (</title>), it is a closing tag. Whatever occurs in between those two tags (text or other tags) is said to be "contained by" the tags. Tags have some effect on whatever they contain.