table-bordered - Adds borders on all sides of the table and cells - HTML CSS Bootstrap Class List

HTML CSS examples for Bootstrap Class List:table-bordered

Description

table-bordered - Adds borders on all sides of the table and cells

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
</head><!--   ww w.  j  a  v a2 s  .co  m-->
<body>

<div class="container">
  <h2>Bordered Table</h2>
  <p>The .table-bordered class adds borders on all sides of the table and the cells:</p>
  <table class="table table-bordered">
    <thead>
      <tr>
        <th>Firstname</th>
        <th>Lastname</th>
        <th>Email</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>John</td>
        <td>H</td>
        <td>I</td>
      </tr>
      <tr>
        <td>Mary</td>
        <td>K</td>
        <td>L</td>
      </tr>
      <tr>
        <td>July</td>
        <td>java2s.com</td>
        <td>b o o k 2 s.com</td>
      </tr>
    </tbody>
  </table>
</div>

</body>
</html>

Related Tutorials