C C++ Java Data Structure Python JavaScript CSS Ajax PL/SQL PHP Puzzles C programs C++ programs Java programs

Home » HTML

Heading tags in HTML (Hyper Text Mark-up Language)

Learn : In this article we will learn some basic and most used tags (Heading Tags) and elements of HTML5.
Submitted by Mayank Singh, on August 08, 2017

Consider the Example:

<!DOCTYPE html>
<meta charset="UTF-8">
<title>Basic Structure of a HTML5 Webpage</title>
	<!--HEADING (there are total 6 Heading Elements in HTML5)-->
	<h1>Heading One</h1>
	<h2>Heading Two</h2>
	<h3>Heading Three</h3>
	<h4>Heading Four</h4>
	<h5>Heading Five</h5>
	<h6>Heading Six</h6>
	<p>Paragraph One</p>


HTML head and paragraph tags

Tags and Elements in the above Example:

<!DOCTYPE html>

This is Document Type declaration made just before the starting of <html> tag, It helps the browser choose the version of HTML to be rendered, the declaration which we have used in the above example is specific for HTML5.


This is the starting tag of a HTML document, it is necessary to have a closing HTML tag.

<meta charset="UTF-8">

This meta information helps the browser to encode the text type properly, charset stands for Character Set. UTF stands for Unicode Transformation Format.


This is the heading element of the HTML document, it contains the title (<title> TITLE INFO. </title>) element of our webpage, the title is displayed in the browser’s tab, heading element also contains the meta information of the webpage.


Everything which we see in the browser’s windows comes under the body tag.


This tag is used to add comments in our HTML document, these are not to be rendered in the browser.


This is the heading tag which ranges from <h1> to <h6>, <h1> tag is used to render the biggest heading and gradually the size is reduced while we use <h2>, <h3>, <h4>,<h5> & <h6>.


This is paragraph tag used to write paragraphs in a HTML document.

Liked this article? Do share with your friends :)