HTML Headings

The <H1>-<H6> tags in the HTML document define 6 headings that indicate different levels of importance.

HTML Heading Example

HTML Heading is defined by <h1> – <h6> tags.

<h1> defines the most important heading. <h6> defines the least important heading.

Here is a sample code for the <h1>-<h6> tag:

<h1>This is an h1 heading. </h1>

<h2>This is an h2 heading. </h2>

<h3>This is an h3 heading. </h3>

<h4>This is an h4 heading. </h4>

<h5>This is an h5 heading. </h5>

<h6>This is an h6 heading. </h6>

The heading is very important

Make sure to use the HTML Heading tags only for the title.Don’t just use Heading tags to generate bold or larger text.

The search engines use the headings to index the structure and content of your web pages.

Because users can quickly browse through your web pages with headings, so it is important to use headings to present the structure of the document.

You should use <h1> as the main heading (most important), followed by <h2> (less important), followed by <h3>, and so on.

Change the font of the HTML headings

The heading text is blod and large by default.Usually the font size is slightly different in different browsers.However, we can change the default font size of the heading text by changing the style attribute.For example:

<h1 style="font-size:60px;">Heading 1</h1>

Leave a Comment

Your email address will not be published.