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 light padding and horizontal divider.

Example

<div class="container">  
  <h2>Striped Rows</h2>  
  <p>The .table-striped class adds zebra-stripes to a table:</p>              
  <table class="table table-striped">  
    <thead>  
      <tr>  
        <th>Product No</th>  
        <th>Product Names</th>  
        <th>Product Price</th>  
      </tr>  
    </thead>  
    <tbody>  
      <tr>  
        <td>1</td>  
        <td>TV</td>  
        <td>24,00</td>  
      </tr>  
      <tr>  
        <td>2</td>  
        <td>Radio</td>  
        <td>3000</td>  
      </tr>  
      <tr>  
        <td>3</td>  
        <td>Fan</td>  
        <td>9000</td>  
      </tr>  
    </tbody>  
  </table>  
</div>

Try Now

Bootstrap Border Table

We can create bootstrap border table by using its class .table-bordered.

Example: <table class="table table-bordered">

Bootstrap Striped Row Table

We can create bootstrap striped row table by using its class .zebra-stripes.

Example: <table class="table table-bordered">

Bootstrap Hover Rows Table

We can create bootstrap hover table by using its class .table –hover. When we will use it then the row will automatically selected.

Example: <table class="table table-hover">

Bootstrap Condensed Table

We can create a compact table by cutting cell padding in half, we have to use its class .table-condensed.

Example: <table class="table table-condensed">

Bootstrap Contextual classes:

In Bootstrap, Contextual classes are used to color the table row or table cells.

There are various contextual classes given below in the table.

Class Description
.active It is used to apply the hover color to the table row or table cell.
.success It is used to indicate a successful or positive action.
.info It is used to indicate a neutral informative change or action.
.warning It is used to specify a warning that might need attention.
.danger It is used to indicate a dangerous or potentially negative action.

Example:

<div class="container">  
  <h2>Striped Rows</h2>  
  <p>The Contextual classes can be used with: .active, .success, .info, .warning, and .danger.</p>  
  <table class="table">  
    <thead>  
<tr><th>Product No</th><th>Product Names</th><th>Product Price</th></tr>  
    </thead>  
    <tbody>  
<tr class="success"><td>1</td><td>TV</td><td>24,00</td></tr>  
<tr class="active"><td>2</td><td>Radio</td><td>3000</td></tr>  
<tr class="danger"><td>3</td><td>Fan</td><td>9000</td></tr>  
<tr class="warning"><td>4</td> <td>Cooler</td><td>7000</td></tr>  
    </tbody>  
  </table>  
</div>

Try Now

Bootstrap Responsive Tables

In Bootstrap, We can create responsive tables by using its class .tables-responsive. We can check the responsive table, by resizing it horizontally.

Example:

<div class="table-responsive">  
  <table class="table">  
    ...  
  </table>  
</div>

Related Topics

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

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

Bootstrap 4 Icons Bootstrap 3 contains the default icon library. But in bootstrap 4, you have to include the external icon library by yourself. Many free icon libraries are available such...

2 minutes read.

Bootstrap Glyphicons

Bootstrap Glyphicon is used to create different type of glyphicons It is used in the web project. It provides 260 Glyphicons from the Glyphivons Halflings set. There are various examples of...

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

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

← Prev Next → ...

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

Bootstrap 4 Toast Bootstrap 4 offers a Toast component, which is quite similar to the alert box and pushes notifications. The toast is visible on the screen for a few seconds when any...

5 minutes read.

Bootstrap With CSS

← Prev Next → ...

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