7.3 The HTML Element and Friends
This page tests a number of head elements. Your browser should provide
a way to view the head material, but browsers frequently omit important
features. Here are the elements exercised on this page:
- 7.2: The document type declaration describes what version of HTML
(or whatever other SGML variant) is in use and gives a URL for its
document type definition (DTD). It occurs before the HTML tag and should
not confuse the browser. Few ``real-world'' documents actually have
an explicit DTD. This page begins with:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"
"http://www.w3.org/TR/REC-html40/frameset.dtd">
- 7.3, 7.4: The HTML element encloses the whole document (except the DTD).
It is possible, but not common practice, to put style information on
the HTML tag. The HEAD element gives general information about the
document. This page has just
<HTML><HEAD>.
- 7.4.3: Each document is ``required'' to have exactly one TITLE element.
Typically it has the same text as the initial H1 element (body title).
The browser does not display the TITLE with the document; instead, it
is used to identify the document in a window frame, in history lists,
etc. This one has:
<title>7.3 The HTML Element and
Friends</title>
- 7.4.4: The META element provides miscellaneous semantic information about
the document, commonly known as "indicia", such as the author's name.
This document has a fairly complete set of indicia. It does not, however,
have any http-equiv headers.
- 12.3: The LINK element, appearing only in the HEAD, declares the URL of
another document and its relation to this one. This document has a link
element for each of the relations described in sect. 6.12 (all pointing to
the index.html file, not really very interesting):
- Alternate
- A substitute version, e.g. in another language.
- Stylesheet
- The style sheet for the document (not used in this
test suite).
- Start
- The first in a set of pages, e.g. the title page.
- Next
- The next in a sequence of pages, e.g. chapters or sections.
- Prev
- The previosu in a sequence of pages.
- Contents or ToC
- Table of contents page.
- Index
- An index (e.g. by words) of the document collection.
- Glossary
- A list of word definitions.
- Copyright
- A copyright notice or statement for the document.
- Chapter
- One chapter in a collection.
- Section
- One section in a collection.
- Appendix
- An appendix in a collection of documents.
- Help
- The help file or usage explanation for a document (form, etc.)
- Bookmark
- A key sub-part of another document identified by name=
or id=.
- 12.4: The BASE element in the head specifies a base URI relative to which
relative URIs are to be resolved. This feature is not tested here.
A URL is a particular kind of URI.
- 14.2.3: The STYLE element encloses an inline style sheet. There may be
several of these in the document and all are effective. It is
tested extensively in the CSS1 test suite and hence is omitted here.
- 7.5.1: The BODY element encloses all the text that is actually to be
displayed. Style controls for the whole document are properly placed in a
STYLE element in the HEAD. However, as deprecated practice, a background
image and the text foreground color can be specified on the BODY tag. This
document has:
<body text=maroon
background="basebg.gif">
The background image is
stolen from the CSS1 test suite, and is white with dotted grid lines.