Set the width of the table to "100%". - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set the width of the table to "100%".

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
table {<!--from   w  w w  . j  a va2 s.c  o m-->
    width: 100%;
}
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