HTML: The Markup Language Reference

h2heading # T

The h1 through h6 elements are headings for the sections with which they are associated.

Permitted contents #

Permitted attributes #

global attributes
Any attributes permitted globally.

Additional constraints and admonitions #

Tag omission #

An h2 element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain flow elements, hgroup

DOM interface #

interface HTMLHeadingElement : HTMLElement {};

Typical default display properties #

h2 {
display: block;
font-size: 1.5em;
margin: .83em 0 .83em 0;
font-weight: bold; }