HTML headings are semantic elements used to define the structure and hierarchy of content on a webpage. Ranging from H1 to H6, heading tags help users, search engines and assistive technologies understand the main subject of a page, its individual sections and the relationships between different topics.
A well-structured heading hierarchy makes website content easier to navigate, interpret and understand. Heading tags form an important part of on-page SEO, website accessibility and content architecture, supporting a more effective digital experience for both users and search engines.
What are HTML headings?
HTML headings are elements within HyperText Markup Language (HTML) that identify titles, sections and subsections of webpage content.
HTML supports six levels of headings, beginning with H1 as the highest level and progressing through to H6 as the lowest level within the content hierarchy.
Each heading level communicates the relationship between different sections of a webpage, creating a logical structure that reflects how information is organised.
<h1>Heading Level 1</h1>
<h2>Heading Level 2</h2>
<h3>Heading Level 3</h3>
<h4>Heading Level 4</h4>
<h5>Heading Level 5</h5>
<h6>Heading Level 6</h6>
Heading elements are commonly referred to as heading tags, header tags or H tags within SEO and website development.
What is the difference between H1, H2, H3, H4, H5 and H6 headings?
Each HTML heading level represents a different position within the hierarchy of a webpage. H1 typically identifies the primary subject, H2 introduces major content sections, and subsequent heading levels provide increasingly detailed subdivisions.
| Heading tag | Hierarchy | Primary purpose | Example |
|---|---|---|---|
| H1 | Level 1 | Main page heading | Digital PR |
| H2 | Level 2 | Major content section | Types of Digital PR campaigns |
| H3 | Level 3 | Subsection within an H2 | Data-led Digital PR |
| H4 | Level 4 | Subsection within an H3 | Consumer research campaigns |
| H5 | Level 5 | Further subdivision | Research methodologies |
| H6 | Level 6 | Most detailed heading level | Survey sampling methods |
What is an H1 tag?
An H1 tag is the highest-level HTML heading and typically identifies the primary subject of a webpage.
It provides a prominent introduction to the content, helping users and search engines establish what the page is about.
Effective H1 headings are clear, descriptive and closely aligned with the primary purpose of the page and the search intent of its intended audience.
What is an H2 tag?
An H2 tag identifies a major section of content within a webpage. H2 headings divide the primary subject into distinct themes, questions or areas of information.
What is an H3 tag?
An H3 tag introduces a subsection within a broader H2 section. It provides additional detail and helps organise related information within a specific theme.
What is an H4 tag?
An H4 tag provides a further level of detail within an H3 subsection. It is particularly useful when a subject contains several related concepts that benefit from their own headings.
What are H5 and H6 tags?
H5 and H6 tags represent the fifth and sixth levels of the HTML heading hierarchy.
These heading levels are particularly relevant to detailed technical documentation, academic publications, extensive knowledge bases and content containing multiple layers of information.
What is the difference between an H1 tag and a title tag?
The H1 tag and HTML title tag both communicate the subject of a webpage, serving complementary purposes within website architecture and organic search.
The title tag is placed within the HTML head section and provides the document's title. It is commonly displayed within browser tabs and can be used by search engines when generating search result title links.
The H1 is placed within the visible body of a webpage and typically acts as its primary content heading.
| Consideration | H1 tag | Title tag |
|---|---|---|
| HTML element | <h1> |
<title> |
| Location | HTML body | HTML head |
| Primary purpose | Communicate the main subject of visible page content | Provide the document title |
| Typical visibility | Within the webpage | Browser tabs and potential search result title links |
| SEO application | Content relevance and semantic structure | Page identification and search result presentation |
| Recommended approach | One clear primary page heading | One descriptive document title |
HTML heading best practices
A consistent approach to HTML headings supports effective content development, website accessibility and on-page SEO across individual webpages and larger digital ecosystems.
| Consideration | Recommended approach |
|---|---|
| Primary heading | Use one clear H1 that accurately identifies the primary subject of the webpage. |
| Heading hierarchy | Organise headings according to the logical relationships between sections and subsections. |
| Heading relevance | Ensure each heading accurately describes the content that follows. |
| Keyword integration | Incorporate relevant search terminology naturally and contextually. |
| Heading length | Use concise, descriptive wording appropriate to the subject and audience. |
| Semantic HTML | Use native HTML heading elements to communicate content hierarchy. |
| Visual styling | Use CSS to control typography, spacing and visual presentation independently. |
| Accessibility | Maintain descriptive headings and logical nesting to support assistive technologies. |
| Template consistency | Establish repeatable heading structures across comparable page types. |
| Content maintenance | Review heading relevance and hierarchy as website content evolves. |
HTML headings frequently asked questions
How many HTML heading levels are there?
HTML supports six heading levels, from H1 to H6. H1 represents the highest level within the heading hierarchy, while H6 represents the most detailed level. Each level helps communicate relationships between different sections of webpage content.
How many H2 tags should a webpage have?
A webpage can contain as many H2 headings as its content requires. Each H2 should introduce a distinct major section that contributes to the primary subject of the webpage.
Does every H2 heading need an H3 heading?
H3 headings are useful when an H2 section contains multiple supporting subjects. An H2 can also introduce paragraphs, lists, tables or other content directly where further subdivision is unnecessary.
Can the H1 and title tag be the same?
Yes. The H1 and title tag can use identical wording where it suits both the webpage and its search presentation. Businesses can also tailor each element independently while maintaining a consistent primary subject.
Can HTML headings contain links?
Yes. Heading elements can contain hyperlinks where they provide a meaningful navigation function. This is commonly used within article listings, product cards and content directories where headings link to individual pages.
Can CSS change the appearance of HTML headings?
Yes. CSS can control the font size, weight, colour, spacing and other visual properties of HTML headings. Their semantic meaning remains determined by the underlying H1 to H6 elements.
Do HTML headings help search engines understand content?
Yes. Descriptive headings provide contextual information about the primary subject and supporting sections of a webpage. They complement other content and technical signals that help search engines interpret relevance and structure.