Analytics choices

Analytics is optional. If allowed, Google measures public pages, navigation, recognized acquisition sources and engagement, including tool and playground use. The site excludes entered code, search terms and form contents from its Analytics events. You can withdraw here. This choice does not change advertising consent.

Read about Analytics and your information.

<h5>

Defines a level 5 heading (minor heading)

Quick Answer

What is the HTML <h5> tag?

The <h5> tag defines a level 5 heading in HTML's heading hierarchy (h1-h6). It represents sub-subsection titles within deeply nested content structures. Use headings in proper order without skipping levels. While less visually prominent than h1-h4, h5 maintains semantic document structure for accessibility and SEO.

Definition and Usage

The <h5> element establishes a level 5 heading in an HTML document. It represents minor headings with lower importance, typically used for very specific details.

HTML headings are defined with the <h1> to <h6> tags, where <h1> is the most important and <h6> is the least important.

Tip: Use <h5> tags for minor headings in highly detailed content. H5 is rarely used in typical web pages but can be valuable in technical documentation.
Note: Most websites don't need H5 headings. Only use them when you have very deep, complex content structure.

Browser support and standards

Browser rendering and modern HTML conformance are different questions. Check the current element reference for the browsers and features your project needs; the older source version table is not a current compatibility guarantee.

Read the MDN element reference

Examples

Basic H5 Heading

Create minor headings with H5:

Example

<h1>Technical Documentation</h1>

<h2>API Reference</h2>

<h3>Authentication</h3>

<h4>OAuth 2.0</h4>

<h5>Authorization Code Flow</h5>
<p>Step-by-step implementation details...</p>

<h5>Implicit Flow</h5>
<p>Alternative authentication method...</p>

H5 with Styling

Style minor headings with CSS:

Example

<style>
  h5 {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
</style>

<h5>Minor Detail</h5>

Document Structure with H5

Very detailed content hierarchy:

Example

<article>
  <h1>Database Design Guide</h1>

  <h2>Relational Databases</h2>

  <h3>Table Design</h3>

  <h4>Primary Keys</h4>

  <h5>Auto-Increment Keys</h5>
  <p>Using sequential IDs...</p>

  <h5>UUID Keys</h5>
  <p>Using universally unique identifiers...</p>

  <h5>Composite Keys</h5>
  <p>Multiple column primary keys...</p>
</article>

Complete Hierarchy Example

All heading levels in context:

Example

<article>
  <h1>Advanced React Patterns</h1>

  <h2>State Management</h2>

  <h3>Context API</h3>

  <h4>Creating Context</h4>

  <h5>Context Provider Setup</h5>
  <p>Configure the context provider component...</p>

  <h5>Context Consumer Patterns</h5>
  <p>Different ways to consume context...</p>

  <h5>Performance Optimization</h5>
  <p>Avoid unnecessary re-renders...</p>
</article>

Heading Hierarchy

HTML headings follow a hierarchical structure from <h1> to <h6>:

H1 - Main Page Title
H2 - Major Section
H3 - Subsection
H4 - Sub-subsection
H5 - Minor heading
H6 - Least important
Warning: Never use <h5> before establishing all previous heading levels (H1 through H4).

Default Heading Sizes

Comparison of default sizes for all heading tags:

Tag Default Size Importance Usage
<h1> 2em (32px) Most Important Main page title (one per page)
<h2> 1.5em (24px) High Major section headings
<h3> 1.17em (18.72px) Medium-High Subsection headings
<h4> 1em (16px) Medium Sub-subsection headings
<h5> 0.83em (13.28px) Low Minor headings
<h6> 0.67em (10.72px) Least Important Lowest level headings

SEO Best Practices

  • Rare Usage: H5 is rarely needed for most websites
  • Technical Content: Best suited for very detailed technical documentation
  • Specific Details: Use for very specific, granular information
  • Proper Order: H5 must follow H4 in the hierarchy
  • Content Depth: Indicates extremely detailed content structure
  • Clarity: Keep H5 headings clear despite their minor importance
  • Alternative Options: Consider using lists or bold text instead of H5

Accessibility

Screen readers and assistive technologies rely on heading structure for navigation:

  • Deep Navigation: H5 provides very specific navigation points
  • Complex Content: Useful for navigating highly detailed content
  • Hierarchy Depth: Shows deep content nesting
  • Proper Order: Must follow H1 → H2 → H3 → H4 → H5
  • Meaningful Text: H5 should describe specific content
  • Consider Alternatives: Sometimes lists are more accessible than deep headings
Accessibility Tip: Very deep heading hierarchies (H5, H6) can be confusing. Consider simplifying content structure when possible.

CSS Styling Examples

Minimal H5 Style

Example

<style>
  h5 {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin: 12px 0 8px 0;
    font-variant: small-caps;
  }
</style>

<h5>Specific Detail</h5>

H5 with Subtle Highlight

Example

<style>
  h5 {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 12px 0 6px 0;
    padding: 4px 8px;
    background: #f9fafb;
    border-radius: 4px;
    display: inline-block;
  }
</style>

<h5>Minor Topic</h5>

Compact H5 Style

Example

<style>
  h5 {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    margin: 10px 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
</style>

<h5>Note</h5>

Best Practices

DO:
  • Use H5 only for very detailed, technical content
  • Ensure H5 relates to its parent H4 section
  • Keep H5 headings brief and specific
  • Follow hierarchy: H1 → H2 → H3 → H4 → H5
  • Consider if simpler structure would work better
DON'T:
  • Use H5 before establishing H1 through H4
  • Skip from H4 to H6 without H5
  • Use H5 in simple content (use H2 or H3 instead)
  • Choose H5 based on visual size alone
  • Overuse H5 - most sites don't need it

When to Use H5

H5 headings are appropriate in these scenarios:

  • API Documentation: Detailed method parameters and return values
  • Technical Manuals: Very specific procedural steps
  • Research Papers: Deep subsection analysis
  • Legal Documents: Nested clauses and sub-clauses
  • Product Specifications: Detailed feature breakdowns
Consider This: If you find yourself using H5 frequently, your content might benefit from being split into separate pages or restructured with a simpler hierarchy.

Related Tags

  • <h1>

    Level 1 heading (main title)

  • <h2>

    Level 2 heading

  • <h3>

    Level 3 heading

  • <h4>

    Level 4 heading

  • <h6>

    Level 6 heading