The Document Header
The document header describes the various properties of the document, including its title, position within the Web, and relationship with other documents. Most of the data contained within the document header is never actually rendered as content visible to the user.
The <head> Tag
The <head> tag
serves to encapsulate other header tags. Place it at the beginning of
your document, just after the <html> tag and before the <body> or <frameset> tag. Both the <head> tag and its corresponding end
</head> tag can be
unambiguously inferred by the browser and so can be safely omitted
from an HTML, but not from an XHTML, document. We encourage you to
include them in all your documents, since they promote readability and
support document automation.
The <head> tag may
contain a number of other tags that help define and manage the
document's content. These include, in any order of appearance:
<base>, <isindex>, <link>, <meta>, <nextid>, <object>, <script>, <style>, and <title>.
The dir and lang attributes
As we discussed in the sections about the <html> tag attributes, dir and lang help extend HTML and XHTML to an
international audience. [The
dir attribute, 3.6.1.1] [The lang attribute,
3.6.1.2]
The profile attribute
Often, the header of a document contains a number of <meta> tags used to convey additional information ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access