Learn Basic HTML Complete Course part 7

1 min read

HTML Heading

A HTML heading or HTML h tag can be defined as a title or a subtitle which you want to display on the webpage. When you place the text within the heading tags <h1>.........</h1>, it is displayed on the browser in the bold format and size of the text depends on the number of heading.

There are six different HTML headings which are defined with the <h1> to <h6> tags, from highest level h1 (main heading) to the least level h6 (least important heading).

h1 is the largest heading tag and h6 is the smallest one. So h1 is used for most important heading and h6 is used for least important.

Headings in HTML helps the search engine to understand and index the structure of web page.

The main keyword of the whole content of a webpage should be display by h1 heading tag.

Heading elements (h1....h6) should be used for headings only. They should not be used just to make text bold or big.


Example

<!doctype html>
<html>
    <head>
    </head>

    <body>
        <h1>Heading no. 1 By TopBlog Pk</h1> 
        <h2>Heading no. 2 By TopBlog Pk</h2> 
        <h4>Heading no. 3 By TopBlog Pk</h4> 
        <h4>Heading no. 4 By TopBlog Pk</h4> 
        <h5>Heading no. 5 By TopBlog Pk</h5> 
        <h6>Heading no. 6 By TopBlog Pk</h6> 
    </body>
</html>

output:

Heading no. 1 By TopBlog Pk 

Heading no. 2 By TopBlog Pk 

Heading no. 3 By TopBlog Pk 

Heading no. 4 By TopBlog Pk 

Heading no. 5 By TopBlog Pk 
Heading no. 6 By TopBlog Pk 



You may like these posts

  • Building blocks of HTMLAn HTML document consist of its basic building blocks which are:Tags: An HTML tag surrounds the content and apply meaning to it. It is written between &…
  •  HTML EntitiesHTML character entities are used as a replacement of reserved characters in HTML. You can also replace characters that are not present on your keyboard by entiti…
  • HTML CharsetHTML Charset is also called HTML Character Sets or HTML Encoding. It is used to display an HTML page properly and correctly because for displaying anything correctly, a…
  • HTML ClassesClass Attribute in HTMLThe HTML class attribute is used to specify a single or multiple class names for an HTML element. The class name can be used by CSS and JavaScrip…
  • HTML Unordered List | HTML Bulleted ListHTML Unordered List or Bulleted List displays elements in bulleted (▫️) format . We can use unordered list where we do not need to…
  • HTML iframesHTML Iframe is used to display a nested webpage (a webpage within a webpage). The HTML <iframe> tag defines an inline frame.Iframe SyntaxAn HTML iframe is defined…

Post a Comment