HTML headings range from <h1>
to <h6>
tags, with <h1>
representing the most significant heading and <h6>
denoting the least significant.
Example
<h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6> |
Note: Browsers automatically insert some white space (a margin) before and after a heading. |
Search engines leverage headings to organize and understand the structure and content of web pages.
Headings are also key for users who tend to scan through a page, making it crucial to use them to illustrate the structure of the document.
Main headings should be marked with <h1>
tags, succeeded by <h2>
for subheadings, and subsequently <h3>
for lesser important titles, continuing in this manner.
While each HTML heading comes with a predefined size, you have the option to customize the size of any heading by employing the style
attribute and utilizing the CSS font-size property.
<h1 style=”font-size:60px;”>Heading 1</h1> |