Headings can be used to describe the topic they precede and they are defined with the <h1> to <h6> tags. Headings support all the global attributes(opens new window).
Search engines and other user agents usually index page content based on heading elements, for example to create a table of contents, so using the correct structure for headings is important.
In general, an article should have one h1 element for the main title followed by h2 subtitles – going down a layer if necessary. If there are h1 elements on a higher level they shoudn't be used to describe any lower level content.
Example document (extra intendation to illustrate hierarchy):
An `h1`–`h6` element must have both a start tag and an end tag.[**1**](https://www.w3.org/TR/html-markup/h1.html)
`h1`–`h6` elements are block level elements by default (CSS style: `display: block`).[**2**](https://www.w3.org/TR/html401/struct/global.html#h-7.5.3)
`h1`–`h6` elements should not be confused with the [section element](http://stackoverflow.com/documentation/html/311/sectioning-elements#t=201607262130086028708)
Heading tags (`h1`–`h6`) are not related to the `head` tag.
The different CSS-styles for headings differ usually in `font-size` and `margin`. The following CSS-settings for `h1`–`h6` elements can serve as an orientation (characterized as 'informative' by the [W3C](https://www.w3.org/TR/CSS21/sample.html))
Search engine spiders (the code that adds a page to a search engine) automatically pays more attention to higher importance (h1 has most, h2 has less, h3 has even less, ...) headings to discern what a page is about.