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. We can create a basic navigation tag with <ul class="nav nav-tabs">. You can mark the current page with <li class="active">. Let us see an example of Bootstrap Tabs:
<div class="container">  
  <h3>Example of  Tabs</h3>  
  <ul class="nav nav-tabs">  
    <li class="active"><a href="#">Home</a></li>  
    <li><a href="#">Service</a></li>  
    <li><a href="#">About</a></li>  
    <li><a href="#">Contact</a></li>  
  </ul>  
</div>
Try Now

Bootstrap Tabs with Dropdown Menu

We can create tabs with the dropdown menu. Let us see an example of Bootstrap Tabs with Dropdown Menu:
<div class="container">  
  <h3>Example of  Tabs</h3>  
  <ul class="nav nav-tabs">  
    <li class="active"><a href="#">Home</a></li>  
    <li class="dropdown">  
    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Tutorial  
    <span class="caret"></span></a>  
    <ul class="dropdown-menu">  
      <li><a href="#">HTML</a></li>  
      <li><a href="#">Bootstrap</a></li>  
    </ul>  
  </li>  
    <li><a href="#">Service</a></li>  
    <li><a href="#">About</a></li>  
    <li><a href="#">Contact</a></li>  
  </ul>  
</div>
Try Now

Bootstrap Pills

We can create pills with the help of <ul class="nav nav-pills">. By default it is supported horizontal. Let us see an example of Bootstrap Pills:
<div class="container">  
  <h3>Example of  Pills</h3>  
  <ul class="nav nav-pills">  
    <li class="active"><a href="#">Home</a></li>  
    <li><a href="#">Service</a></li>  
    <li><a href="#">About</a></li>  
    <li><a href="#">Contact</a></li>  
  </ul>  
</div>
Try Now

Bootstrap Vertical Pills

We can create vertical pill by using .nav-stacked class.
<div class="container">  
  <h3>Example of Vertical Pills</h3>  
<ul class="nav nav-pills nav-stacked">  
    <li class="active"><a href="#">Home</a></li>  
    <li class="dropdown">  
    <a class="dropdown-toggle" data-toggle="dropdown" href="#">Tutorial  
    <span class="caret"></span></a>  
    <ul class="dropdown-menu">  
      <li><a href="#">HTML</a></li>  
      <li><a href="#">Bootstrap</a></li>  
    </ul>  
  </li>  
    <li><a href="#">Service</a></li>  
    <li><a href="#">About</a></li>  
    <li><a href="#">Contact</a></li>  
  </ul>  
</div>
Try Now

Note : We can create center/justify Tabs and pills by using .nav-justified class.

Bootstrap Dynamic Pills

Bootstrap Dynamic Pills is same as dynamic toggleable tabs but there is some difference that can be understand by its example. Example
<div class="container">  
  <h2>Example of Dynamic Pills</h2>  
  <ul class="nav nav-pills">  
    <li class="active"><a data-toggle="pill" href="#home">Home</a></li>  
    <li><a data-toggle="pill" href="#menu1">Service</a></li>  
    <li><a data-toggle="pill" href="#menu2">About</a></li>  
    <li><a data-toggle="pill" href="#menu3">Contact</a></li>  
  </ul>    
  <div class="tab-content">  
    <div id="home" class="tab-pane fade in active">  
      <h3>HOME</h3>  
     <p>Welcome to <strong>Home Page</strong>. Today we are learning Bootstrap Tutorial.</p>  
    </div>  
    <div id="menu1" class="tab-pane fade">  
      <h3>Services</h3>  
      <p>Welcome to our<strong> Service Page</strong>. We provides a lots of services.</p>  
    </div>  
    <div id="menu2" class="tab-pane fade">  
      <h3>About</h3>  
     <p>Welcome to<strong> About Page.</strong> We provides a lots of services.</p>  
    </div>  
    <div id="menu3" class="tab-pane fade">  
      <h3>Contact</h3>  
      <p>You can <strong> Contact us.</strong></p>  
    </div>  
  </div>  
</div>
Try Now

Related Topics

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 Panels

A bootstrap panel is used to create bordered box with some padding around its content. It is created with the .panels classes, and .panel-body classes. There are following classes of the panel: Panel header Panel...

4 minutes read.

Bootstrap 4 Grid System

Bootstrap 4 Grid Systems Bootstrap offers a responsive and mobile-first grid system with the help of which we can divide the screen of the web browser into 12 horizontal parts. It has predefined classes...

4 minutes read.

Bootstrap 4 Popover

Bootstrap 4 Popover Popover A popover is similar to the tooltip. The only difference between tooltip and Popover is that in the tooltip, the popup box appears when you move the cursor...

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

Bootstrap Tables

We can create different types of responsive and awesome bootstrap table like: striped , border etc. Bootstrap Basic Table We can create a basic bootstrap table by using its class .table. It has...

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

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

Bootstrap provides simple and easily customized typography for headings, body text, lists, and many more. Headline <h1> to <h6> By default, Bootstrap has HTML headings (<h1> to <h6>) that are given below: Example <h1>h1. Bootstrap heading</h1>   <h2>h2. Bootstrap heading</h2>   <h3>h3. Bootstrap heading</h3>   <h4>h4. Bootstrap heading</h4>   <h5>h5. Bootstrap heading</h5>   <h6>h6. Bootstrap heading</h6> Try Now ←...

1 minute read.

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 Contact Us page

What is a “Contact Us” page? A “Contact Us” page is a web page available on the websites of various companies, organisations etc., for its users to contact the organisation or...

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

Bootstrap 4 Utilities

Bootstrap 4 Utilities Bootstrap 4 utilities also known as helper classes that are used to add more style to the components. Utilities are used to make the website or webpage more stylish or elegant....

10 minutes read.

Bootstrap 4 Buttons

Bootstrap Buttons Bootstrap provides many custom button styles. These buttons are used in forms and dialog boxes for actions. Bootstrap offers various predefined classes for providing styles to buttons. There are many classes that are used...

7 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 First Example

1) Add HTML5 doctype Before starting the example of Bootstrap, we should know about the some basic rules of Bootstrap. We have to add HTML5 doctype with lang element and CSS properties. <!DOCTYPE html>   <html lang="en">     <head>       <meta charset="utf-8">      </head>   </html> 2) Bootstrap...

2 minutes read.

Bootstrap 4 Tutorial

What is Bootstrap? Bootstrap is a CSS (Cascading Style Sheets) framework, which is used to develop a responsive website. It is an open-source and mobile-first front-end framework. It has design templates that are based...

4 minutes read.

Bootstrap 4 Colors

Bootstrap 4 Colors Bootstrap 4 consists of classes that are used to set colors according to the context of the element, and with the help of these classes, we can read...

2 minutes read.