Bootstrap Tutorial - Create bordered table








The following code shows how to create bordered table.

Example

<!DOCTYPE html>
<html>
<head>
  <link
    href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css"
    rel="stylesheet">
</head><!-- www . j a  v  a2 s .  c o m-->
<body style='margin:30px'>
  <div class="row">
    <table class="table table-bordered">
      <thead>
        <tr>
          <th>#</th>
          <th>Col 1</th>
          <th>Col 2</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>1</td>
          <td>Row 1</td>
          <td class="text-right">1600.00</td>
        </tr>
        <tr>
          <td>2</td>
          <td>Row 2</td>
          <td style="text-align: right">400.00</td>
        </tr>
      </tbody>
    </table>
  </div>
</body>
</html>

Click to view the demo