/    /  HTML Heading

HTML Heading

 

HTML offers six different HTML headings which are defined with the <h1> to <h6> tags, from highest level h1  and the least level h6.So h1 is used for the most important heading or title and h6 is used for the least important.

 

Example:

 

<!DOCTYPE html>
<html>
<body>
<h1>Heading no. 1</h1> 
<h2>Heading no. 2</h2> 
<h3>Heading no. 3</h3> 
<h4>Heading no. 4</h4> 
<h5>Heading no. 5</h5> 
<h6>Heading no. 6</h6> 
</body>
</html>

 

OUTPUT:

 

HTML Heading

 

HTML headings is used with the nested elements and different codes to display the way to use heading elements.

 

Example:

 

<!DOCTYPE html> 
<html> 
<head> 
 <title>Heading elements</title> 
</head> 
<body> 
  <h1>This is main heading of page. </h1> 
  <p> which is used to display the text</p> 
  <h2>This is first sub-heading</h2> 
  <p>h2 describes the first sub heading of page. </p> 
  <h3>This is Second sub-heading</h3> 
  <p>h3 describes the second sub heading of page.</p>        
</body> 
</html>

 

OUTPUT:

 

HTML Heading

 

Supporting Browsers:    

 

HTML Heading