The Heading Tag in HTML
Lessons Covered


There are a set of pre-defined headings in HTML. Headings can be used to give a title or subtitle.




The Heading Tag

The <h> tag, gives a heading. The tag by itself is incomplete. There are six (6) different levels of headings that can be applied along with the heading tag. The numbers range from 1 to 6.

Each number corresponds to a specific level and gives a specific font size. The font sizes range from largest, <h1> to smallest, <h6>.

To apply a heading, simply put the heading tag followed by one of the levels (from 1 to 6). Remember all opened tags should have a close. Closing tags have a backslash in it.


Below is a code snippet of the heading tag application:

	 <h1>  This is heading 1 with the LARGEST font size  </h1> 
	

arrow  Click to see result

In order to get the other headings replace the <h1> with the respective heading you wish to achieve. For example if you want to achieve heading 2 use <h2>, heading 3 <h3> and so forth.


Provided is the code snippet for all other headings. Click the link under the snippet to view how it is represented in your broswer.

	 <h2>  This is heading 2 font size  </h2> 
	 <h3>  This is heading 3 font size  </h3> 
	 <h4>  This is heading 4 font size  </h4> 
	 <h5>  This is heading 5 font size  </h5> 
	 <h6>  This is heading 6 with the SMALLEST font size  </h6> 
	

arrow  Click to see result

Practise Excercise

Now, using your code editor, create and then identify the level of headings below.



New2HTML.COM

Read it. Learn it. Apply it.



Now that we have learnt to produce headings we are on our way, ready for the next lesson ? We will now learn about paragraphs.




    Previous Lesson Previous Lesson - The Basics                            Next Lesson - Paragraphs Next Lesson