Saturday, January 5, 2019

A table with headings

A table with headings:- 


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

<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>24</td>
  </tr>
  <tr>
    <td>JORDAN</td>
    <td>Sharma</td>
    <td>28</td>
  </tr>
</table>

</body>
</html>

OUTPUT:-

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...