Headers and divisions

Long texts are usually divided into smaller parts, such as chapters or sections, each having their own title.

Headers

Headers can be used to create crude section and sub-section divisions in the document. The heading elements, H1 to H6, hold title text with varying degrees of highlighting. H1 is the most important, and is typically used only for the title of the document. At the other extreme, H6 is the least important header, and should only be used when six levels of heading are necessary.

Although no specific formatting style is indicated, typically the header elements are all displayed in bold typeface and the point size of the text varies, increasing with the level of importance:

 <h1>The Document Title</h1> <h2>A Section ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.