How to create headings in HTML page?

HTMLWeb DevelopmentFront End Technology

HTML provides 6 tags to create headings i.e. h1, h2, h3, h4, h5 and h6. Use any of the heading tags <h1> to <h6> and every tag will give you the different size of the heading. The <h1>tag defines the most important heading and <h6> defines the least important heading.

Just keep in mind that you should use these tags inside <body>…</body> tags.


You can try to run the following code to create different headings in an HTML page

<!DOCTYPE html>
      <title>HTML Headings</title>

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


Updated on 22-Dec-2021 07:25:44