asp.net.ph

Skip Navigation Links

h1 - h6 Elements


Renders text as levels of section headings.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

NOTE: Both start and end tags are required.

Remarks

The <h1> to <h6> elements are used to define six levels of different sized headings.

The numbers serve to group levels of section content: h1 for the top-level section, h2 for a subsection, h3 for a sub-subsection, and so on.

You can think of headings as introductory labels for each section’s content, as in a book: h1 for the title, h2 for chapter headings, h3 for section headings, h4 for article headings, and so on.

Headings are usually displayed in a bolder and larger font than normal body text, with level 1 headings ( <h1> ) being the most prominent, and level 6 headings ( <h6> ) the least.

Heading information can be used by browsers and screen readers to generate an outline or a table of contents for a document automatically. For conformity, authors are advised not to skip heading levels, so the outline will consistently start from h1, followed by h2 and so on.

Heading elements create a block-level box in the layout, starting on a new line and taking up the full width available in their containing block.

Attributes

The <h1 - h6> element has no attribute of its own, but supports global attributes common to all HTML elements.

Example

The following example shows how CSS can be used to apply styles to heading elements.

 Show me 

External References

See Also

HEADER   Using Heading Elements



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note