This reference is built into PageRIJ — a live HTML, CSS & SVG authoring and learning environment.

HTML <h4> element

The <h4> element represents a fourth-level heading. It normally introduces a subsection within a section headed by <h3>. For example, an "Installation" section could have separate instructions for "Windows" and "Linux," each introduced by an <h4>.

Further subdivisions of either set of instructions would normally use <h5>. Another <h4> begins a subsection at the same level, while returning to <h3> begins a new section at the level of "Installation." When moving into a deeper subsection, advance one rank without skipping a level. Returning to a higher rank can cross several levels when the intervening subsections have ended.

The element encloses the heading text, with the section's content following it. Its font size, weight, and spacing can be changed with CSS. The use of this rank depends on the content's position in the document hierarchy, rather than on how small or large the heading needs to appear.

Attributes: GLOBALS.

Typical layout:
<h1>Software guide</h1>
<h2>Getting started</h2>
<h3>Installation</h3>
<h4>Windows</h4>
<p>Download the Windows installer.</p>
Visual representation:

Software guide

Getting started

Installation

Windows

Download the Windows installer.