Bootstrap 4 Content

Typography

Typography is used for styling and formatting the content. It also helps in creating customized headings, sub-headings, lists, paragraphs, etc.

Headings

Bootstrap 4 offers HTML heading <h1> to <h6> that has bolder font-weight and larger font-size.

Example

<!DOCTYPE html>
 <html lang="en">
 <head>
   <title>Bootstrap Headings Example</title>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
 </head> 
 <body>
 <div class="container">
   <h1>h1 - Tutorial and Example</h1>
   <h2>h2 - Tutorial and Example </h2>
   <h3>h3 - Tutorial and Example </h3>
   <h4>h4 - Tutorial and Example </h4>
   <h5>h5 - Tutorial and Example </h5>
   <h6>h6 - Tutorial and Example </h6>
 </div>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script> 
 </body>
 </html> 

Output

Bootstrap 4 Content

Display Headings

Bootstrap offers display headings that are used for creating headings with bigger font-size and lighter font-weight. There are four classes in display headings, which are .display-1, .display-2, .display-3, .display-4

Example

<!DOCTYPE html>
 <html lang="en">
 <head>
   <title>Bootstrap Display Headings Example</title>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
   </head>
 <body>
 <div class="container">
   <h1>Display Headings</h1>
   <h1 class="display-1">Display 1</h1>
   <h1 class="display-2">Display 2</h1>
   <h1 class="display-3">Display 3</h1>
   <h1 class="display-4">Display 4</h1> 
 </div>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
 </body>
 </html> 

Output

Bootstrap 4 Content

<mark>

Bootstrap 4 offers HTML <mark> tag which is used to highlight any text.

Example 

<!DOCTYPE html>
 <html lang="en">
 <head>
   <title>Bootstrap mark tag Example</title>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> 
 </head>
 <body>
 <div class="container">
   <h3>Tutorial and <mark>Example</mark></h3>
 </div>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> 
   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
 </body>
 </html> 

Output

Bootstrap 4 Content

<abbr>

<abbr> tag is used to display the description of the abbreviation when you mouse pointer over the <abbr> element.

Example

<!DOCTYPE html>
 <html lang="en">
 <head>
   <title>Abbriv Example</title>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script> 
 </head>
 <body>
 <div class="container">
   <h1>Abbreviations</h1>
   <p>When you move the cursor over the over the abbrivations the description will be displayed below the abbrivation.</p>
   <h4><abbr title="Hyper Text Markup Language">HTML</abbr> </h4>
   <h4><abbr title="Cascading Style Sheets">CSS</abbr> </h4> 
 </div>
 </body>
 </html> 

Output

Bootstrap 4 Content

<kbd>

<kbd> tag is used when you want to display any keyboard input like shortcut keys on the screen.

Example

<!DOCTYPE html>
 <html lang="en">
 <head>
   <title>Bootstrap keyboard input Example</title>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> 
 </head>
 <body>
 <div class="container">
   <h1>Keyboard Inputs</h1>
   <p>To indicate input that is entered by the keyboard, use the kbd element:</p>
   <p><kbd>ctrl + c</kbd>is used to copy text and other objects.</p>
   <p><kbd>ctrl + v</kbd> is used to paste text and other objects.</p> 
 </div>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
 </body>
 </html> 

Output

Bootstrap 4 Content

Lists

Bootstrap 4 offers different types of lists, which are as follows;

Unstyled List - In unstyled list, we can display the list items without any list-style and left margin.

Inline List – In the inline list, we can display all the list items in a single line.

Description List - In the description list, the list items are displayed along with the description.

Example

<!DOCTYPE html>
 <html lang = "en">
    <head>
       <meta charset = "utf-8">
       <meta name = "viewport" content = "width = device-width, initial-scale = 1">
       <link rel = "stylesheet" 
          href = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
       <title>Bootstrap Lists Example</title> 
    </head>
    <body>
       <div class = "container">
         <h2>Bootstrap Lists</h2>
          <h4>Unstyled List</h4>
          <ul class = "list-unstyled">
             <li>C</li>
             <li>C++</li>
             <li>Java</li>
          </ul>
          <h4>Inline List</h4>
          <ul class = "list-inline"> 
             <li class = "list-inline-item">C</li>
             <li class = "list-inline-item">C++</li>
             <li class = "list-inline-item">Java</li>
          </ul>
          <h4>Description list</h4>
          <dl class = "row">              <dt class = "col-sm-3">C</dt>
             <dd class = "col-sm-9">C is the procedural programming language.</dd>
             <dt class = "col-sm-3">C++</dt>
             <dd class = "col-sm-9">C++ is a object oriented language.</dd>
             <dt class = "col-sm-3">Java</dt>
             <dd class = "col-sm-9">Java is a pure object oriented language.</dd>
          </dl>        </div>
       <script src = "https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
       <script src = "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
       <script src = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
  </body>
 </html> 

 Output

Bootstrap 4 Content

Related Topics

Bootstrap Notification Bubble

What is a notification bubble? Bubbles are built into the Notification system. They float on top of the website or the button to indicate pending notifications. Bubbles can be expanded to reveal...

5 minutes read.

Bootstrap 4 Jumbotron

Bootstrap 4 Jumbotron Bootstrap offers Jumbotron, which is used to get more attention to specific content or information on the web page. It provides a gray background-color to the content to make that content...

2 minutes read.

Bootstrap 4 Layout

Containers Containers are the essential elements of the bootstrap layout. It is required when we are using a bootstrap grid system. Containers can also be nested, but most layouts do not need nested containers. Bootstrap has...

3 minutes read.

Dropdown & Dropup

Bootstrap Dropdowns The bootstrap dropdown menu is used to create a toggleable menu. It provides users to choose one value from a predefined list. Before creating dropdown menu, we have to know...

3 minutes read.

Bootstrap Datepicker

What is a Bootstrap Datepicker? It is used to display a calendar with the date, month, and time from a dropdown menu. We will use an example to see how the date...

5 minutes read.

Bootstrap Pager

← Prev Next → ...

1 minute read.

Bootstrap 4 Tooltip

Bootstrap 4 Tooltip Tooltip Bootstrap 4 offers a tooltip component, a small popup box that appears when you move the cursor over an element such as buttons or any highlighted element. It...

3 minutes read.

Bootstrap Tabs and Pills

Bootstrap Menus Bootstrap menu is used to create different types of menu. It can created horizontal with its .list-inlineclass. <div class="container">       <h3>Example of Bootstrap Menu</h3>       <ul class="list-inline">         <li><a href="#">Home</a></li>         <li><a href="#">About</a></li>         <li><a href="#">Contact</a></li>         <li><a href="#">services</a></li>       </ul>     </div> Try Now Bootstrap Tabs Bootstrap tabl is look like is menu but there is some difference....

4 minutes read.

Bootstrap Buttons Groups

Bootstrap 4 Button Group Bootstrap 4 provides a feature button group that helps in creating a series of buttons together in a group. Basic Button Group  The .btn-group class is used within the <div> tag to create a...

6 minutes read.

Bootstrap 4 Spinners

Bootstrap 4 offers spinner is a loading indicator that is used to display the loading state of any component or web page. The spinner is also known as a loader...

7 minutes read.

Environment Setup

How to use Bootstrap? We can use bootstrap in our project either by downloading or by providing link of the library files. 1) Download Bootstrap files To download files, visit official site of bootstrap www.getbootstrap.com/download/ and...

1 minute read.

Bootstrap 4 Pagination

Bootstrap 4 Pagination Bootstrap pagination is used to show the existence of a series of web pages of the website. It allows navigation on multiple pages of a website. In pagination, there is a block...

9 minutes read.

Bootstrap 4 Scrollspy

Bootstrap 4 Scrollspy Bootstrap 4 offers a scrollspy component that is used to make the website more attractive and eye-catching. Basically, the scrollspy is used on the single-page website. The scrollspy highlights the nav...

5 minutes read.

Bootstrap 4 Flex

Bootstrap 4 Flex Flex is a Bootstrap 4 component used to manage the layout, navigation bar, grid columns, sizing, alignment, and other components. The flexbox or flex utility is the replacement...

26 minutes read.

Bootstrap Searchable Dropdown Menu

Searchable Dropdown Menu When we click on the dropdown button/arrow in this dropdown menu, an input field will pop up with all the dropdown items listing inside. If we type in...

5 minutes read.

Bootstrap Images

Bootstrap 4 Images Bootstrap provides several classes for images to make them responsive and also helps to give some style to the images. Image Shapes Rounded Corners Bootstrap 4 offers .rounded class that makes the corners...

5 minutes read.

Bootstrap 4 Margin classes

Bootstrap 4 contains a variety of brief, responsive margin and padding utility classes to change the appearance of an element. The Bootstrap 4 margin classes use for the outer spacing of...

8 minutes read.

Bootstrap 4 Media Objects

Bootstrap 4 Media Objects Bootstrap 4 offers a media object component that aligns the media objects and the content. The media object is used to create a repetitive and complex component...

7 minutes read.

Bootstrap Multiselect Dropdown

What is a multi-select Dropdown? Multi-select dropdown lists are used when we want to select multiple options for a particular record. Usually, dropdown lists provide the feature of choosing just one value...

4 minutes read.

Bootstrap 4 Form

Bootstrap 4 Forms Bootstrap 4 provides forms, which are one of the essential components for web pages and web applications. It is an input-based component, used to collect user data with the help of...

8 minutes read.