Bootstrap Striped Table Style

Striped Table

Use .table-striped to add zebra-striping to any table row within the <tbody>.


<!DOCTYPE HTML>
<html>
<head>
<link href="http://java2s.com/style/bootstrap.min.css" rel="stylesheet">
</head><!--  ww  w  .ja va 2  s  .c om-->
<body style='margin: 20px;'>

  <table class="table table-striped">
    <caption>This is the caption.</caption>
    <thead>
      <tr>
        <th>Header 1</th>
        <th>Header 2</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Data 1</td>
        <td>Data 2</td>
      </tr>
      <tr>
        <td>Data 1</td>
        <td>Data 2</td>
      </tr>
      <tr>
        <td>Data 1</td>
        <td>Data 2</td>
      </tr>
      <tr>
        <td>Data 1</td>
        <td>Data 2</td>
      </tr>
      <tr>
        <td>Data 1</td>
        <td>Data 2</td>
      </tr>
    </tbody>
  </table>
</body>
</html>

Click to view the demo





















Home »
  Bootstrap »
    Tutorial »




Bootstrap
Basic HTML Style
List
Table