HTML <h5> Tag
Description
The <h5> tag in HTML represents a fifth-level heading. It is part of the six-tiered hierarchy of headings in HTML, ranging from <h1> (the most important) to <h6> (the least important). Headings help structure content by establishing a clear outline and providing semantic meaning, which is important for both users and search engines.
The <h5> tag is typically used for subsections nested under <h4> headings. It conveys that the content it wraps is a subsection of a larger topic but is less significant than higher-level headings. Visually, browsers usually render <h5> text smaller than <h4> but larger than <h6>, although the exact appearance can vary depending on the default stylesheet of the browser or any custom CSS applied.
Using <h5> contributes to accessibility and SEO, as it gives screen readers and search engines clues about the document’s structure and hierarchy. It’s best to use <h5> for logical organization rather than visual styling; heading levels should reflect the content hierarchy rather than just text size.
Example of a <h5> in context:
<h2>Website Features</h2>
<h3>Design Options</h3>
<h4>Color Themes</h4>
<h5>Dark Mode</h5>
<p>This section describes the available dark mode settings for the website.</h5>
In this example, <h5> clearly shows that “Dark Mode” is a subtopic under “Color Themes,” maintaining a logical content structure.
Properties
- Permitted Parents
- Any element that accepts flow content.
- Content
- Inline and text
- Start/End Tags
- Start tag: required, End tag: required
Example
Attributes
None
Global Attributes
The <h1> tag also supports the Global Attributes in HTML5
Event Attributes
The <h1> tag also supports the Event Attributes in HTML5
Browser Support
The following information will show you the current browser support for the HTML <h5> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.
This tag is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 26th December 2025
