What are the Bootstrap Heading Class

Bootstrap Heading Class

In this article, I would like to discuss bootstrap heading class. Bootstrap heading classes allow us to display the content of an HTML tag as a heading. Bootstrap provides 6 different heading classes:

  • h1: displays the content of an HTML tag as an HTML heading 1
    <p class="hi">Some text</p>
  • h2: displays the content of an HTML tag as HTML heading 2
    <p class="h2">Some text</p>
  • h3: displays the content of an HTML tag as HTML heading 3
    <p class="h3">Some text</p>
  • h4: displays the content of an HTML tag as HTML heading 4
    <p class="h4">Some text</p>
  • h5: displays the content of an HTML tag as HTML heading 5
    <p class="h5">Some text</p>
  • h6: displays the content of an HTML tag as HTML heading 6
    <p class="h6">Some text</p>

Example Code

<p class="h1">Heading 1</p>
<h1>Heading 1</h1>

<p class="h2"> Heading 2</p>
<h2>Heading 2</h2>

<p class="h3"> Heading 3</p>
<h3>Heading 3</h3>

<p class="h4"> Heading 4</p>
<h4>Heading 4</h4>

<p class="h5"> Heading 5</p>
<h5>Heading 5</h5>

<p class="h6"> Heading 6</p>
<h6>Heading 6</h6>

Output:

bootstrap heading class

Bootstrap classes can be used for all tags in HTML. So, Whenever we need to use HTML header tags instead ofwe can use Bootstrap header classes.

READ ALSO  How to Link Bootstrap to an HTML page

Leave a Reply