Collapse the table borders into a single border. - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Collapse the table borders into a single border.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
table {<!--from   w ww.  j  a v a 2s .c  o  m-->
    border-collapse: collapse;
}
table, td, th {
    border: 1px solid black;
}
</style>
</head>
<body>

<table>
  <tr>
    <th>Firstname</th>
    <th>Lastname</th>
  </tr>
  <tr>
    <td>A</td>
    <td>B</td>
  </tr>
  <tr>
    <td>C</td>
    <td>B</td>
  </tr>
</table>

</body>
</html>

Related Tutorials