The <h2> Element
As defined in the HTML Living Standard, the <h2> element represents a second-level heading, typically used for major sections within a page.
Visual Example:
This is a Rank 2 Heading
<h2>Major Section Heading</h2>
View HTML Living Standard: Headings
Structural Hierarchy
The <h2> should always follow an <h1>. Jumping from an H1 to an H3 breaks the logical outline of the document.
- Logical Nesting: Use H2s to break the main topic (H1) into its primary components.
- Consistency: Ensure all major sections of equal importance use the same heading level.
WCAG Requirement: Info and Relationships
Success Criterion 1.3.1 (Level A): Information, structure, and relationships conveyed through presentation can be programmatically determined.
Properly nested headings allow screen reader users to understand the relationship between the main topic and its sub-sections.
Understand SC 1.3.1: Info and Relationships