Adding Sub Headings to Bootstrap Header tags


To add Sub Heading for H1-H6 tag we can make use of tag within the header tags.

You can also make other HTML elements behave like the secondary header tags by using class small.

Example :
<h1>This is My H1 Heading <small>This is my sub heading</small></h1>
<h2>This is My H2 Heading <small>This is my sub heading</small></h2>
<h3>This is My H3 Heading <small>This is my sub heading</small></h3>
<h4>This is My H4 Heading <small>This is my sub heading</small></h4>
<h5>This is My H5 Heading <small>This is my sub heading</small></h5>
<h6>This is My H6 Heading <small>This is my sub heading</small></h6>
Output :

This is My H1 Heading This is my sub heading

This is My H2 Heading This is my sub heading

This is My H3 Heading This is my sub heading

This is My H4 Heading This is my sub heading

This is My H5 Heading This is my sub heading
This is My H6 Heading This is my sub heading



Recent Posts:




Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.