Setting Up an HTML Document 95
Structural
Tags
Setting Up an HTML Document
Web Design in a Nutshell, eMatter Edition
The Document Header
The header, delimited by the
tag, contains information that describes theHTML document. The head tag has no attributes of its own, but merely serves as a
container for other tags that help define and manage the document’s contents.
Titles
The most commonly used element within the header is the document title (within
the page’s contents. The title is also used as the name of the link as displayed in a
user’s bookmarks or “hot list.” Search engines rely heavily on document titles as
well. For all these reasons, it is important to provide thoughtful and descriptive
titles for all your documents and avoid vague titles such as “Welcome,” or “My
Page.”
Other header elements
Other useful HTML elements are also placed within the
tags of adocument:
This tag establishes the document’s base location, which serves as a refer-
ence for all the links in the document. For more information, see Chapter 8,
Creating Links.
This tag defines the relationship between the current document and another
document. Although it can signify relationships such as index, next, and
previous, it is most often used today to link a document to an external style
sheet (see Chapter 23,Cascading Style Sheets).
“Meta” tags are used to provide information about a document, such as
keywords or descriptions to aid search engines. It may also be used for client-
pull functions. The tag is discussed later in this chapter.