HTML and CSS Reference
In-Depth Information
Figure 4-5. HTML/XHTML authors typically use heading
level six for boilerplate text
4.2.4. Allowed Heading Content
A heading may contain any element allowed in text, including conven-
tional text, hyperlinks ( <a> ), images ( <img> ), line breaks ( <br> ), font em-
bellishments ( <b> , <i> , <tt> , <u> , <strike> , <big> , <small> , <sup> , <sub> ,
and <font> ), and content-based styles ( <acronym> , <cite> , <code> , <dfn> ,
<em> , <kbd> , <samp> , <strong> , and <var> ). In practice, however, font or
style changes may not take effect within a heading because the heading
itself prescribes a font change within the browser.
At one time early on, there was widespread abuse of the heading tags
as a way to change the font of entire sections of a document. Technic-
ally, paragraphs, lists, and other block elements are not allowed within a
heading and may be mistaken by the browser to indicate the implied end
of the heading. In practice, most browsers apply the style of the head-
ing to all contained paragraphs. We discourage this practice because it
is not only a violation of HTML and XHTML standards, but also is usually
ugly to look at. Imagine if your local paper printed all the copy in head-
line type!
Large sections of heading text defeat the purpose of the tag. If you
really want to change the font or type sizes in your document, use the
standard cascading style definitions. See Chapter 8 for details.
Search WWH ::




Custom Search