Bootstrap 5 provides a wide range of typography classes that allow you to easily style and format text in your web pages. These classes can be applied to various HTML elements such as headings, paragraphs, links, lists, and more. Here are some commonly used typography classes in Bootstrap 5
These are just some of the typography classes available in Bootstrap 5. You can combine these classes with other Bootstrap classes to create visually appealing and well-formatted text in your web pages.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Typography</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" /> <link rel="stylesheet" href="css/base.css" /> <style> html { font-size: 16px; } </style> </head> <body style="min-height: 2500px"> <div class="container"> <h1>Bootstrap Typography</h1> <!--Regular Heading Tags--> <h1>Heading -1</h1> <h2>Heading -2</h2> <h3>Heading -3</h3> <h4>Heading -4</h4> <h5>Heading -5</h5> <h6>Heading -6</h6> <!--Heading Classes--> <p class="h1">h1 Bootstrap Class Heading</p> <p class="h2">h2 Bootstrap Class Heading</p> <p class="h3">h3 Bootstrap Class Heading</p> <p class="h4">h4 Bootstrap Class Heading</p> <p class="h5">h5 Bootstrap Class Heading</p> <p class="h6">h6 Bootstrap Class Heading</p> <!--Customizing headings--> <h3>Tutor Joe's <small class="text-primary">Software Solution</small></h3> <!--Display heading Classes--> <h1 class="display-1">Display-1 size - 5.rem</h1> <h1 class="display-2">Display-2 size - 4.5 rem</h1> <h1 class="display-3">Display-3 size - 4rem</h1> <h1 class="display-4">Display-4 size - 3.5 rem</h1> <h1 class="display-5">Display-5 size - 3 rem</h1> <h1 class="display-6">Display-6 size - 2.5 rem</h1> <!--Inline text elements--> <p>Tutor <mark>Joes</mark> Software Solution</p> <p>Tutor <span class="mark">Joes</span> Software Solution</p> <!--Abbreviations --> <p><abbr title="HyperText Markup Language">HTML</abbr></p> <p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr></p> <!--Lead & Text Alignment --> <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Neque vitae harum tempora odio dolores ipsum eos aspernatur, corporis unde. Ratione!</p> <p class="lead">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Neque vitae harum tempora odio dolores ipsum eos aspernatur, corporis unde. Ratione!</p> <p class="lead text-center">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Neque vitae harum tempora odio dolores ipsum eos aspernatur, corporis unde. Ratione!</p> <p class="lead text-end">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Neque vitae harum tempora odio dolores ipsum eos aspernatur, corporis unde. Ratione!</p> <p class="lead text-sm-end text-md-center text-lg-start text-primary">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Neque vitae harum tempora odio dolores ipsum eos aspernatur, corporis unde. Ratione!</p> <!--Lists --> <ul class="list-unstyled"> <li>List Item</li> <li>List Item</li> <li>List Item</li> <li> List Item <ul> <li>List Item</li> <li>List Item</li> <li>List Item</li> </ul> </li> <li>List Item</li> <li>List Item</li> </ul> <ul class="list-inline"> <li class="list-inline-item">Menu</li> <li class="list-inline-item">Menu</li> <li class="list-inline-item">Menu</li> <li class="list-inline-item">Menu</li> </ul> <!--Text Decoration & Font Weight--> <p class="text-decoration-underline">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Reiciendis, pariatur?</p> <p class="text-decoration-line-through">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Reiciendis, pariatur?</p> <p>Lorem ipsum dolor, sit <a href="" class="text-decoration-none">Click me </a> amet consectetur adipisicing elit. Reiciendis, pariatur?</p> <p class="fw-bold">Lorem ipsum dolor sit amet consectetur adipisicing elit. Debitis, repellendus?</p> </div> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script> </body> </html>Live Preview
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions