Bootstrap's Default Settings

What is Typography

Typography classes and sample program and output

<h1>-<h6> or .h1-.h6

Program for heading tag
  1. <!DOCTYPE html>
  2. <html >
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial scale=1">
  6. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  7. </head>
  8. <body>
  9. <div class="container">
  10. <div class="row">
  11. <div class="col-ls-12 well">
  12. <h1>h1 Bootstrap heading is(36px)</h1>
  13. <h2>h2 Bootstrap heading is(30px)</h2>
  14. <h3>h3 Bootstrap heading is(24px)</h3>
  15. <h4>h4 Bootstrap heading is(18px)</h4>
  16. <h5>h5 Bootstrap heading is(14px)</h5>
  17. <h6>h6 Bootstrap heading is(12px)</h6>
  18. </div>
  19. </div>
  20. </div>
  21. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  22. <script type="text/css" src="js/jquery"></script>
  23. </body>
  24. </html>
Output
Bootstrap

<Small>

Program for <small>
  1. <!DOCTYPE html>
  2. <html >
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial scale=1">
  6. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  7. </head>
  8. <body>
  9. <div class="container">
  10. <div class="row">
  11. <div class="col-ls-12 well">
  12. <h1>h1 Bootstrap heading is<small>(36px)<small></h1>
  13. <h2>h2 Bootstrap heading is<small>(30px)<small></h2>
  14. <h3>h3 Bootstrap heading is<small>(24px)<small></h3>
  15. <h4>h4 Bootstrap heading is<small>(18px)<small></h4>
  16. <h5>h5 Bootstrap heading is<small>(14px)<small></h5>
  17. <h6>h6 Bootstrap heading is<small>(12px)<small></h6>
  18. </div>
  19. </div>
  20. </div>
  21. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  22. <script type="text/css" src="js/jquery"></script>
  23. </body>
  24. </html>
Output
Bootstrap

<mark>

Sample program for <mark>
  1. <!DOCTYPE html>
  2. <html >
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial scale=1">
  6. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  7. </head>
  8. <body>
  9. <div class="container">
  10. <div class="row">
  11. <div class="col-ls-12 well">
  12. <p>
  13. On the Insert tab, the galleries include items that are<mark> designed</mark> to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look.
  14. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look.
  15. </p>
  16. </div>
  17. </div>
  18. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  19. <script type="text/css" src="js/jquery"></script>
  20. </body>
  21. </html>
Output
Bootstrap

<abbr>

Sample program for <abbr>
  1. <!DOCTYPE html>
  2. <html >
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial scale=1">
  6. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  7. </head>
  8. <body>
  9. <div class="container">
  10. <div class="row">
  11. <div class="col-ls-12 well">
  12. <h3> <abbr title="Bootstrap">BT</abbr> Typography</h3>
  13. </div>
  14. </div>
  15. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  16. <script type="text/css" src="js/jquery"></script>
  17. </body>
  18. </html>
Output
Bootstrap

<blockquote>

Sample program for <blockquote>
  1. <!DOCTYPE html>
  2. <html >
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial scale=1">
  6. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  7. </head>
  8. <body>
  9. <div class="container">
  10. <div class="row">
  11. <div class="col-ls-12 well">
  12. <blockquote>
  13. "Learn More Be Smart"
  14. <footer>C# Corner</footer>
  15. </blockquote>
  16. </div>
  17. </div>
  18. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  19. <script type="text/css" src="js/jquery"></script>
  20. </body>
  21. </html>
Output
Bootstrap

<kbd>

If you are creating some lines of content that line will have some Shortcut keys, means that key will be highlighted in the different style.
Sample program for <kbd>
  1. <!DOCTYPE html>
  2. <html >
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial scale=1">
  6. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  7. </head>
  8. <body>
  9. <div class="container">
  10. <div class="row">
  11. <div class="col-ls-12 well">
  12. <h5>please press <kbd>CTRL+C</kbd>to copy...</h5>
  13. </div>
  14. </div>
  15. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  16. <script type="text/css" src="js/jquery"></script>
  17. </body>
  18. </html>
Output
Bootstrap

<code>

<pre>

Sample program for <pre>
  1. <!DOCTYPE html>
  2. <html >
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial scale=1">
  6. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  7. </head>
  8. <body>
  9. <div class="container">
  10. <pre>
  11. This is
  12. C#corner
  13. Contribution
  14. </pre>
  15. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  16. <script type="text/css" src="js/jquery"></script>
  17. </body>
  18. </html>
Output
Bootstrap

<dl>

Sample program for <dl>
  1. <!DOCTYPE html>
  2. <html >
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial scale=1">
  6. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"
  7. </head>
  8. <body>
  9. <div class="container">
  10. <div class="row well">
  11. <dl>
  12. <dt>Coffee</dt>
  13. <dd>Black hot drink</dd>
  14. <dt>Milk</dt>
  15. <dd>White cold drink</dd>
  16. </dl>
  17. </div>
  18. </div>
  19. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  20. <script type="text/css" src="js/jquery"></script>
  21. </body>
  22. </html>
Output
Bootstrap

Colors and Backgrounds

Bootstrap also has some contextual classes that can be used to provide meaning through colors.
The classes for text colors are
The classes for background colors are
These classes are used to change the font color and background color

More Typography Classes

Class Description
.lead Makes a paragraph stand out
.small smaller text (set to 85% of the size of the parent)
.text-left left-aligned text
.text-center center-aligned text
.text-right right-aligned text
.text-justify justified text
.text-nowrap no wrap text
.text-lowercase lowercased text
.text-uppercase uppercased text
.text-capitalize capitalized text
.initialism Displays the text inside an <abbr> element in a slightly smaller font size
.list-unstyled works on both <ul> and <ol>to remove the default list-style from any nested lists, apply this class to any nested lists as well
.list-inline Places all list items on a single line
.dl-horizontal Lines up the terms (<dt>) and descriptions (<dd>) in <dl> elements side-by-side. Starts off like default <dl>s, but when the browser window expands, it will line up side-by-side
.pre-scrollable Makes a <pre> element scrollable
<del> deleted text
<s> Indicates no longer relevant text: No longer relevant text
<ins> Inserted text
<u> Underlined text
<strong> Bold text
<em> Italic text
<ul> unordered list
<ol> ordered list

Conclusion

I hope, now you understand how to use bootstrap typography in HTML webpages. In the future, we will learn about more bootstrap techniques step by step. Stay tuned!