Wednesday, January 2, 2019

A table with collapsed borders

A table with collapsed borders:- 


<html>
<head>
<style>
table, th, td {
  border: 2px 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>Akash</td>
    <td>Jaiswal</td>
    <td>20</td>
  </tr>
  <tr>
    <td>Ansh</td>
    <td>Rana</td>
    <td>23</td>
  </tr>
  <tr>
    <td>Jordan</td>
    <td>Singh</td>
    <td>30</td>
  </tr>
</table>

</body>
</html>

OUTPUT:-  

sk.


No comments:

Post a Comment

Internal Javascripts

Internal Javascripts :    The script code can be written directly into the HTML document. script code is placed in header of the docume...