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

Difference between bootstrap.css and bootstrap-theme.css

The "bootstrap.css" uses to create a website with pre-existing designs and context. It uses basic Bootstrap classes like rows and columns with a CSS styling tool. The website is styled...

5 minutes read.

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...

8 minutes read.

Bootstrap 4 Modal

Bootstrap 4 Modal The Modal is a component of Bootstrap 4, which is a dialog box or pop-up window. The modals are used to provide information or warning to the user, such as...

18 minutes read.

Bootstrap 4 Alerts

Bootstrap 4 Alerts Bootstrap 4 offers alerts that are used to provide feedback messages on the user’s actions. There is no boundation of text length in the alerts. Alerts can be created...

1 minute 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 Dropdowns

Bootstrap Dropdowns Bootstrap 4 provides a dropdown component, which is a toggle and contextual layout, used to display a predefined list of links. It allows the user to select a value from the dropdown...

15 minutes read.

CakePHP Layouts & Elements

A layout includes a presentation code that can be wrapped out in your view. It means that what you want to see in your view should be well-positioned in layout. When you create...

9 minutes read.

Bootstrap Input groups

Bootstrap 4 Input groups The input group is a component of Bootstrap 4, which is used to create interactive and stylish form controls. With the help of input groups, you can easily customize the input...

8 minutes read.

Bootstrap 4 Grid System

Bootstrap 4 Grid System The bootstrap 4 grid system is used to create a responsive website layout. The bootstrap 4 offers a mobile-first flexbox grid system that allows you to divide...

4 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 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.

Bootstrap Time Picker Example

What is a Bootstrap Time picker? It is used to display the time in hours, minutes and seconds from a dropdown menu. In this section, we will create an example to...

4 minutes read.

Bootstrap Validation Example

Validation We can provide valuable and actionable feedback to the users through an HTML form validation. It happens via custom styles or behaviors of default browsers and JavaScript. How does validation work...

4 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 4 Card

In Bootstrap 4, a card is a bordered box with padding around its content. It has options for headers, footers, colors, content, etc. The card provides the link, title, image,...

8 minutes read.

Bootstrap 4 Grid Classes

Bootstrap 4 Grid Classes Extra-small Grid – In the extra-small grid system class, when you create the grid (columns), the columns will not be stacked on top of each other on...

8 minutes read.

Bootstrap Wells

In Bootstrap, well are used to add a rounded border around an element. It is default some padding and gray background color. It is like a container that displays the content....

1 minute read.

Bootstrap 4 Carousel

Bootstrap 4 Carousel Bootstrap 4 offers a carousel component, which is also known as a slider or slideshow. The carousel is used for the dynamic representation of content using images with...

7 minutes read.

Bootstrap Navigation bar

Navigation Bars In Bootstrap, We can create navigation bar like a navigation header. It is placed at the top of the page. We can collapse or extend it according to screen...

3 minutes read.