HTML Headings #6 – DEV Community

HTML headings are titles or subtitles that you simply need to show on a webpage.


Heading 2

Heading 3

Heading 4

Heading 5

Heading 6

HTML Headings

HTML headings are outlined with the <h1> to <h6> tags.

<h1> defines crucial heading. <h6> defines the least essential heading.


<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6> 
Enter fullscreen mode

Exit fullscreen mode

Be aware: Browsers mechanically add some white house (a margin) earlier than and after a heading.

Headings Are Vital

Search engines like google use the headings to index the construction and content material of your internet pages.

Customers usually skim a web page by its headings. It is very important use headings to indicate the doc construction.

<h1> headings must be used for most important headings, adopted by <h2> headings, then the much less essential <h3>, and so forth.

Be aware: Use HTML headings for headings solely. Do not use headings to make textual content BIG or daring.

Larger Headings

Every HTML heading has a default dimension. Nevertheless, you possibly can specify the scale for any heading with the model attribute, utilizing the CSS font-size property:

<h1 model="font-size:60px;">Heading 1</h1>
Enter fullscreen mode

Exit fullscreen mode

Add a Comment

Your email address will not be published. Required fields are marked *