Skip to content

<h4> - Level 4 Heading

Block-level HTML 1.0

The <h4> element represents a fourth-level heading, used for detailed subsections within <h3> sections. It’s useful for deeply structured content that requires fine-grained organization.

Result
<h4>Detailed Subsection Title</h4>

The <h4> element creates a detailed subsection heading beneath <h3> headings.

The <h4> element supports all global attributes like id, class, style, and lang.

<h4 id="step-1" class="tutorial-step">Step 1: Setup</h4>
Result
Result
Result
Result

Use <h4> when you need to break down <h3> sections into smaller parts:

<h1>Web Development Course</h1>
<h2>Frontend Development</h2>
<h3>HTML</h3>
<h4>Elements and Tags</h4>
<h4>Attributes</h4>
<h4>Semantic HTML</h4>
<h3>CSS</h3>
<h4>Selectors</h4>
<h4>Box Model</h4>

Always maintain proper hierarchy:

<h1>Title</h1>
<h2>Section</h2>
<h3>Subsection</h3>
<h4>Detail</h4>
Result

Ensure font sizes reflect the heading level:

Result
Result

Screen readers allow users to navigate by heading level:

<!-- Screen reader announces: "Heading level 4: Configuration Options" -->
<h4>Configuration Options</h4>

Use descriptive text that’s clear without context:

<h4>Required Dependencies</h4>
<h4>Optional Plugins</h4>
<h4>Development Tools</h4>

If you’re using <h4> frequently, consider if simpler structure would work:

<h3>Features</h3>
<ul>
<li><strong>Fast:</strong> Optimized performance</li>
<li><strong>Secure:</strong> Industry-standard encryption</li>
<li><strong>Scalable:</strong> Grows with your needs</li>
</ul>
  • Technical documentation with detailed subsections
  • Step-by-step tutorials with multiple sub-steps
  • API reference with method parameters
  • Educational content with fine-grained topics
  • Simple blog posts (stick to h1-h3)
  • Marketing pages (often h1-h3 is sufficient)
  • Short articles (simpler hierarchy works better)
BrowserVersionNotes
Chrome1+Full support
Firefox1+Full support
Safari1+Full support
Edge12+Full support
IE3+Full support

The <h4> element has been supported since the earliest browsers.

    and

      Consider lists for flat content instead of deep headings. Learn more →