Monday, January 7, 2019

Horizontal/Vertical table headings

Horizontal/Vertical table headings:-   


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

<h2>Horizontal Headings:</h2>

<table style="width:100%">
  <tr>
    <th>Name</th>
    <th>Telephone</th>
    <th>Telephone</th>
  </tr>
  <tr>
    <td>Akash Jaiswal</td>
    <td>987 8866 528</td>
    <td>987 8866 528</td>
  </tr>
</table>

<h2>Vertical Headings:</h2>

<table style="width:100%">
  <tr>
    <th>Name:</th>
    <td>Akash Jaiswal</td>
  </tr>
  <tr>
    <th>Telephone:</th>
    <td>987 8866 528</td>
  </tr>
  <tr>
    <th>Telephone:</th>
    <td>987 8866 528</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...