bootstrap

Bootstrap Tables

Bootstrap Tables

For creating tables, Bootstrap provides a tidy layout. The following are some of the table components that Bootstrap supports:

Add the base class of table to any table for a lovely, basic table style with just some light padding and horizontal dividers, as demonstrated in the following example.

<table class = "table">
   <caption>asic Table Layout</caption>
   <thead>
        <tr>
            <th>Name</th>   
            <th>City</th>
       </tr>
 </thead>
      <tbody>
       <tr>
            <td>Tanmay</td>
           <td>Bangalore</td>
      </tr>
            <tr>         
<td>Sachin</td>
         <td>Mumbai</td>
      </tr>
  </tbody>
</table>

Optional Table Classes

There are a couple extra classes you may use to style the HTML in addition to the fundamental table markup and the.table class. The sections that follow will provide you an overview of all of these classes.

Striped Table

You may achieve stripes on rows within the tbody> by adding the.table-striped class, as seen in the following example.

<table class = "table table-striped">
   <caption>Striped Table Layout</caption>
         <thead>
      <tr>
          <th>Name</th>
         <th>City</th>
      <th>Pincode</th>
      </tr>
  </thead>
      <tbody>
      <tr>
          <td>Tanmay</td>
         <td>Bangalore</td>
         <td>560001</td>
      </tr>     
         <tr>   
         <td>Sachin</td>
         <td>umbai</td>
         <td>400003</td>
      </tr>
       <tr>
           <td>Uma</td>
           <td>une</td>
           <td>411027</td>
     </tr>
</tbody>
<table>