[ HTML Tag Information | Return to HTML Background File ]
What's an HTML tag?
Nearly all HTML Tags come in pairs and have the same format:
< tag > tagged stuff < /tag >
Opening < tag > and
Closing < /tag > Tags
Example of an HTML Anchor Tag
* HTML Tags come in pairs
- The left-hand tag '<'
and the right-hand tag '>'
"mark up" whatever they surround.
- They can surround text or images or a combination of both.
- Though some tags may be used singly (empty tags), using
pairs is the correct,
error-free way to mark up your document.
* HTML Tag format:
"< tag > tagged stuff
< /tag >"
- The Open and Close tags are often on the same line, but they can
also be at the beginning and end of a document (e.g., the body tag).
* Opening Tags: < tag > and
* Closing Tags: < /tag >
- All tags begin with a '<' ("less than" or "left angle bracket").
- In closing tags a '/' (forward slash) comes right after the left bracket.
- Next comes the name of the tag.
- Optional attributes may follow the tag name.
- The tag name and attributes are separated by space.
- A '>' ("greater than" or "right angle bracket") closes the tag.
EXAMPLE:
Here's how the commonly-used "a" or "Anchor" Tag might be written:
In your HTML file:
Go back to the <a href="intro.htm">Introduction</a>!
Produces this:
Go back to the Introduction!
Notice that "tagged text" has a different COLOR and is UNDERLINED.
We'll look at the Anchor Tag and others in detail later on.
Hyperlinks: Introduction |
Table of Contents
Questions? E-mail your Instructor -
Dr. Charles Rubenstein
Tutorial Copyright (c) 1996-2006
C.P.Rubenstein