Tuesday, January 1, 2019

A table with borders

A table with borders:-   


<html>
<head>
<style>
table, th, td {
  border: 2px solid black;
}
</style>
</head>
<body>

<h2>Bordered Table</h2>
<p>Use the CSS border property to add a border to the table.</p>

<table style="width:100%">
  <tr>
    <th>Firstname</th>
    <th>Lastname</th>
    <th>Age</th>
  </tr>
  <tr>
      <td>Akash</td>
    <td>Jaiswal</td>
    <td>23</td>
  </tr>
  <tr>
    <td>Ansh</td>
    <td>Singh</td>
    <td>25</td>
  </tr>
  <tr>
      <td>Joshif</td>
    <td>Sharma</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...