By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

HTML h2 Element

Reference on the h2 sectioning element of HTML.

Edited: 2014-12-28 07:05

The h2 is a heading element, it is used to create a subsection in a first-level section.

This heading element should typically not be used for navigation headings, consider using h1 instead, if it makes sense to do so.


Atributte: Value: Description:
Global Attributes Varies The Global attributes can be used on any HTML element.

Using HTML h1 to h6

Note. Generally its best to use h1 first, then h2, h3 ETC.

<h1>h1 - Headline1</h1>
<h2>h2 - Headline2</h2>
<h3>h3 - Headline3</h3>
<h4>h4 - Headline4</h4>
<h5>h5 - Headline5</h5>
<h6>h6 - Headline6</h6>