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

Bootstrap 4 navbar

A navigation navbar or navbar uses in every website to make it more user-friendly. Navigating through the website is easier, and the user can instantly search for the topic of...

8 minutes read.

Bootstrap Badges and Labels

Bootstrap Badges Bootstrap Badges are numerical indicators. It is used to show that how many items are associated with a link.The .badge class is used to create of Bootstrap Badges. Let us see...

2 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 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 Collapse

Bootstrap 4 Collapse Collapse is a bootstrap component that is similar to the dropdown button. Collapse is used to hide or show the content such as paragraphs, sentences, etc.  When we click on a...

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.

Bootstrap 4 List Groups

Bootstrap 4 List Groups Bootstrap 4 offers List Group component, which is used to display a series of content in an organized way. The most common list group is an unordered...

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

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

 Bootstrap 4 Filters Bootstrap 4 provides a filter component that is used to search an element from a list, table, etc. Bootstrap does not contain any component or utility that helps...

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