Table of Contents

HTML Headings

  • The HTML headings are used to define the heading of contents.
  • In HTML are  the <h1> to <h6> tags.
  • The largest tag is <h1> and smallest tag is <h6>.

Note: Browsers automatically add some white space (a margin) before and after a heading.

Example of Heading tags
<!DOCTYPE html>
<html>
<head>
<title>Use of heading tag</title>
</head>
<body>

<h6>This is a Heading 6</h6>
<h5>This is a Heading 5</h5>
<h4>This is a Heading 4</h4>
<h3>This is a Heading 3</h3>
<h2>This is a Heading 2</h2>
<h1>This is a Heading 1</h1>

</body>
</html>
English Hindi