4 years ago
Shahzad Gujjar
1,888 Views
2
You will learn how to make headings in HTML in this article.
Organizing Content with Headings
Headings assist in defining the hierarchy and structure of the content on a web page.
HTML has six levels of heading tags, <h1> through <h6>; the higher the heading level number, the more important the heading is; thus, the <h1> tag defines the most important heading in the document, while the <h6> tag defines the least important heading.
Browsers display headings in a larger, bolder font than normal text by default. Also, <h1> headings have the largest font size, whereas <h6> headings have the smallest font size.
<h1>Heading level 1</h1>
<h2>Heading level 2</h2>
<h3>Heading level 3</h3>
<h4>Heading level 4</h4>
<h5>Heading level 5</h5>
<h6>Heading level 6</h6>
The performance of the preceding example is as follows:
When you use the heading tag on a web page, the built-in style sheets in your browser generate some empty space (known as margin) before and after each heading. To override the browser’s default style sheet, use the CSS margin property.
NOTE: Using CSS font properties, you can easily customize the appearance of HTML heading tags, such as font size, boldness, typeface, and so on.
Importance of Headings
HTML headings provide useful information by highlighting important topics and the document’s structure; therefore, they should be carefully optimized to increase user engagement.
To make your text look BIG or bold, don’t use headings. Use them only to highlight your document’s heading and to illustrate the document’s structure.
Because search engines like Google use headings to index the structure and content of web pages, make sure you use them carefully in yours.
Use the <h1> headings as your page’s primary headings, then the <h2> headings, then the less important <h3> headings, and so on.
NOTE: The <h1> tag is used to indicate the most important heading, which is usually found at the top of the page. In general, an HTML document should have only one <h1> heading, followed by lower-level headings like <h2>, <h3>, <h4>, and so on.
4 years ago
Shahzad Gujjar
1,888 Views
2