InterviewSolution
Saved Bookmarks
| 1. |
How to add inline subheadings in Bootstrap |
|
Answer» The <small> ELEMENT is used if you want to add inline subheadings to headings. You can also use the .small class and get a text SMALLER than the normal text To add an inline subheading to any of the headings, simply add <small> around any of the elements or add .small class and you will get smaller text in a lighter color. The below example creates inline subheading under <h1> and <h2>: <!DOCTYPE html> <html lang="en"> <head> <TITLE>Bootstrap Inline Subheading</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link REL="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h1>Heading1 <small> Smaller Heading1 </small> </h1> <h2>Heading2 <small> Smaller Heading2 </small> </h2> </div> </body> </html>The above displays the following OUTPUT with inline subheadings: |
|