HTML 4.01 Test Suite - Assertions
Testable Assertions: Section 7 The global structure of an HTML document
7 The global structure of an HTML document - The HEAD and BODY of a document
Assertion 7.1-1
(author)(must) An HTML document is composed of three parts: An HTML 4 document is composed of three parts: 1. a line containing HTML version information, 2. a declarative header section (delimited by the HEAD element), 3. a body, which contains the document's actual content.
Tests: None
Assertion 7.1-2
(must) White space (spaces, newlines, tabs and comments) may appear before or after each section of an HTML document. [NOTE: Authors may do it, meaning that user agents must support it.]
Tests: None
Assertion 7.1-3
(author)(should) The head and body of an HTML document should be delimited by the HTML element.
Tests: None
Assertion 7.2-1
(author)(must) A valid HTML document declares what version of HTML is used in the document. The document type declaration names the document type definition (DTD) in use for the document.
Tests: None
Assertion 7.3-1
(author)(must) HTML element: The start tag and end tag are required.
Tests: None
Assertion 7.3-2
(must)(deprecated) version = cdata [CN]
Deprecated. The value of this attribute specifies which HTML DTD version governs the current document. This attribute has been deprecated because it is redundant with version information provided by the document type declaration.
Tests: None
Assertion 7.3-3
(author)(must) After document type declaration, the remainder of an HTML document is contained by the HTML element.
Tests: None
Assertion 7.4.1-1
(author)(must) HEAD: The start tag and end tag are optional.
Tests: None
Assertion 7.4.1-2
(must) HEAD profile = uri [CT]
This attribute specifies the location of one or more meta data profiles, separated by white space. For future extensions, user agents should consider the value to be a list even though this specification only considers the first URI to be significant.
Tests: None
Assertion 7.4.1-3
(should) User agents do not generally render elements that appear in the HEAD as content.
Tests: None
Assertion 7.4.2-1
(author)(must) TITLE: The start tag and end tag are required.
Tests: None
Assertion 7.4.2-2
(author)(must) Every HTML document must have a TITLE element in the HEAD section.
Tests: None
Assertion 7.4.2-3
(author)(should) Authors should use the TITLE element to provide context-rich titles to identify the contents of a document.
Tests: None
Assertion 7.4.2-4
(must) User agents must always make the content of the TITLE element available to users, including TITLE elements that occur in frames. The mechanism for doing so depends on the user agent.
Assertion 7.4.2-5
(must) Titles may contain character entities. [NOTE: Since authors may do it, user agents must support it.]
Tests: None
Assertion 7.4.2-6
(author)(must) Titles may not contain other markup, including comments.
Tests: None
Assertion 7.4.3-1
(author)(must) title = text [CS]
This attribute offers advisory information about the element for which it is set.
Tests: None
Assertion 7.4.3-2
(may) Values of the title attribute may be rendered by user agents in a variety of ways.
Tests: None
Assertion 7.4.4-1
(may) In general, specifying meta data involves two steps: 1. Declaring a property and a value for that property. This may be done in two ways: a. From within a document, via the META element. b. From outside a document, by linking to meta data via the LINK element (see the section on link types). 2. Referring to a profile where the property and its legal values are defined. To designate a profile, use the profile attribute of the HEAD element.
Tests: None
Assertion 7.4.4-2
(author)(must) META: The start tag is required and the end tag is forbidden.
Tests: None
Assertion 7.4.4-3
(may) META: http-equiv = name [CI]
This attribute may be used in place of the name attribute. HTTP servers use this attribute to gather information for HTTP response message headers.
Tests: None
Assertion 7.5.1-1
(author)(must) BODY: The start tag and end tag are optional.
Tests: None
Assertion 7.5.1-2
(should)(deprecated) BODY: background = uri [CT] The value of this attribute is a URI that designates an image resource. The image generally tiles the background (for visual browsers).
Tests: None
Assertion 7.5.1-3
(must)(deprecated) BODY: text = color [CI] This attribute sets the foreground color for text (for visual browsers).
Tests: None
Assertion 7.5.1-4
(must)(deprecated) BODY: link = color [CI] This attribute sets the color of text marking unvisited hypertext links (for visual browsers).
Tests: None
Assertion 7.5.1-5
(must)(deprecated) BODY: vlink = color [CI] This attribute sets the color of text marking visited hypertext links (for visual browsers).
Tests: None
Assertion 7.5.1-6
(must)(deprecated) BODY: alink = color [CI] This attribute sets the color of text marking hypertext links when selected by the user (for visual browsers).
Tests: None
Assertion 7.5.1-7
(author)(must) The body of a document contains the document's content.
Tests: None
Assertion 7.5.2-1
(author)(must) id = name [CS]
This attribute assigns a name to an element. This name must be unique in a document.
Tests: None
Assertion 7.5.2-2
(author)(must) class = cdata-list [CS]
This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names. Multiple class names must be separated by white space characters.
Tests: None
Assertion 7.5.4-1
(author)(must) SPAN and DIV: The start tag and end tag are required.
Tests: None
Assertion 7.5.4-2
(must) The DIV element defines its content to be block-level, but imposes no other presentational idioms on the content.
Assertion 7.5.4-3
(must) The SPAN element defines its content to be inline, but imposes no other presentational idioms on the content.
Assertion 7.5.4-4
(should) Visual user agents generally place a line break before and after DIV elements.
Tests: None
Assertion 7.5.5-1
(author)(must) H1, H2, H3, H4, H5 and H6: The start tag and end tag are required.
Tests: None
Assertion 7.5.5-2
(should) There are six levels of headings in HTML with H1 as the most important and H6 as the least. Visual browsers usually render more important headings in larger fonts than less important ones.
Assertion 7.5.6-1
(author)(must) ADDRESS: The start tag and end tag are required.
Tests: None