Table of Contents

What is HTML Heading?

The HTML heading tag is used for providing different headings to the HTML document. Headings consists of h1, h2, h3, h4, h5, h6 total 6 headings. HTML heading is used for highlighting headings or subheadings in your HTML document. When you write a heading in between < h1 > </ h1 > then it will show in your browser in bold format with the different sizes depending upon which number you are using in your HTML document.

Syntax-

< h1 > HTML heading </ h1 >

< h2 > HTML heading </ h2 >

< h3 > HTML heading </ h3 >

< h4 > HTML heading </ h4 >

< h5 > HTML heading </ h5 >

< h6 > HTML heading </ h6  >

Example-

				
					<!DOCTYPE html>
<html>
   <head>
      <title>heading</title>
   </head>
<body data-rsssl=1>
     <h1> GEEKY4U.COM </h1> 
     <h2> Learn with Passion</h2>
</body>
</html>
				
			

Output:

6.1

What is the h1 heading in HTML?

In HTML document h1 tag indicate the most important heading in your browser. It helps to display main content or text. Whatever is written in between < h1 > </ h1 > tag consider the HTML heading element under the HTML tag.

Syntax- < h1 > HTML heading < h1 >

Example-

				
					<!DOCTYPE html>
<html>
   <head>
      <title>heading</title>
   </head>
   <body data-rsssl=1>
      <h1> GEEKY4U.COM </h1>  
   </body>
</html>

				
			

Output:

6.2

Explain h1 to h6 headings in HTML?

Heading tag consists of six tags which are H1, H2, H3, H4, H5 and H6. < h1 > </ h1 > Represents most important and main heading and < h6 ></ h6 > Represents small heading and least important heading.

H1- < h1 > </ h1 > Define Main heading in HTML document. This heading is use for displaying the main keywords of the HTML document.

H2- < h2 > </ h2 > Define sub heading which come under first main heading.

H3- < h3 > </ h3 > Define second sub heading which comes under your first sub heading.

H4 & H5- These tags are also used for small subheadings accordingly.

H6- < h6 > </ h6 > Defines very small heading which may be not very much important heading in your html document.

Example-

				
					<!DOCTYPE html>
<html>
   <head>
      <title>heading</title>
   </head>
   <body data-rsssl=1>
      <h1> GEEKY4U.com </h1> 
	  <h2> GEEKY4U.com (Learn with Passion) </h2> 
	  <h3> GEEKY4U.com (Learn with Passion) </h3> 
	  <h4> GEEKY4U.com (Learn with Passion) </h4> 
	  <h5> GEEKY4U.com (Learn with Passion) </h5> 
	  <h6> GEEKY4U.com (Learn with Passion) </h6> 
   </body>
</html>

				
			

Output:

6.3

Note- h1 heading represents most important and main heading and h6 heading represents small heading and least important heading.

What is the use of HTML heading Tag?

HTML headings comes with h1, h2, h3, h4, h5, h6 six different types. These 6 different tags use in the heading to highlight different headings according to their importance in the text document. More important headings along with the subheadings and less important headings all the headings used in the HTML text Document so that end-user can understand text documents very easily.

How to make a heading in HTML?

In HTML, for adding HTML heading we need to use of heading tag. This heading tag can come with a Paragraph tag. For writing heading tag < heading > mention which heading tag you wish to use. </ close heading tag > after writing content in it we need to close the heading tag. Syntax and examples with output are given below.

Syntax- < heading tag > some content < heading tag >

Example-

				
					<!DOCTYPE html>
<html>
   <head>
      <title>heading</title>
   </head>
<body data-rsssl=1>
      <h1> GEEKY4U.com </h1> 
	  <h2> GEEKY4U.com (Learn with Passion) </h2> 
	  <p> GEEKY4U.com is a best platform where we are providing you the BEST. </p> 
	 
</body>
</html>

				
			

Output:

6.4

What is the Importance of HTML Heading?

HTML headings are very useful in your HTML documents this will help to look your HTML document or the website easy to understand and very attractive. It is important to understand different HTML heading in HTML. HTML headings help to highlight the important structure of paragraphs more important topics in the document according to the user convenience so that users can easily understand the text or important content in the HTML document. Make sure in the HTML document we should not use HTML headings to make the text bold and big we can only use heading for highlighting purposes.