TABLE BORDER IN HTML

 TABLE BORDER IN HTML 

When you add a border to a table, you also add borders around each table cell:

To add a border, use the CSS border property on table, th, and td elements:



<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
  border: 1px solid black;
  border-collapse: collapse;
}
</style>
</head>
<body>

<h2>Collapsed Borders</h2>
<p>If you want the borders to collapse into one border, add the CSS border-collapse property.</p>

<table style="width:100%">
  <tr>
    <th>Firstname</th>
    <th>Lastname</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Jill</td>
    <td>Smith</td>
    <td>50</td>
  </tr>
  <tr>
    <td>Eve</td>
    <td>Jackson</td>
    <td>94</td>
  </tr>
  <tr>
    <td>John</td>
    <td>Doe</td>
    <td>80</td>
  </tr>
</table>

</body>
</html>


                                                                    



No comments:

Post a Comment

How To Use Audio In Html

 How To Use Audio In Html  Friends, if you want to put a  <audio>  in html, then you have to use the audio tag. Some examples are giv...