Set the border to "2px solid green" for table, th and td elements. - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set the border to "2px solid green" for table, th and td elements.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
   border: 2px solid green;
}
</style><!--from  w w  w .  j a  va  2 s  . co m-->
</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