Monday, January 7, 2019

Table cells that span more than one row

Table cells that span more than one row:-     


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

<h2>Cell that spans two rows</h2>
<p>To make a cell span more than one row, use the rowspan attribute.</p>

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