In HTML, Heading is put into the web page with the help of
is used for the most important headings i.e. for the main headings on which the focus has to be maximum whereas
is used for least important headings.
Importance of Heading:
- Search Engines use headings for indexing the structure and organizing the content of the webpage.
- Headings are used for highlighting important topics.
- They provide valuable information and tell us about the structure of the document.
For 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>
- Font-size of the HTML heading can be alter through the size attribute of the
For Example :
<!DOCTYPE html> <html> <body> <h1><font size="5">Techno Brainz</font></h1> </body> </html>
- HTML heading tag also has an align attribute that aligns the content inside a heading element. It has four values i.e. left, right ,center and justify.
- But now the align attribute is obsolete i.e. we don’t use it.
By default, <h1> – <h6> tags have the properties as it has bold font it comes in center.
If we understand with CSS margin-left, margin-right, font-weight, display :
margin-left: 0; margin-right: 0; font-weight: bold; display: block;
Watch HTML headings video (with examples) on YouTube – Click here
HTML Symbols Codes that you don’t know – Click here
HTML Paragraph Tag – Click here