The way the HTML markup is structured means that you in some rows can have four cells, some three cells, some two cells and so forth. In order for this to actually function, you need to use the attributes colspan and rowspan (the value of these attributes is always whole numbers).

<html>
<body>
<h3>Span two columns:</h3>
<table border="8">
  <tr>
       <th>Name</th>
	   <th colspan="2">Phone No.</th>
	   
  </tr>
  <tr>
       <td>Simran</td>
	   <td>0073002220</td>
	   <td>0063002220</td>
  </tr>
  </table>
  <h3>Span two rows:</h3>
<table border="8">
  <tr>
       <th>Name</th>
	   <td>Simran</td>
	   
  </tr>
  <tr>
       <th rowspan="2">Phone No.</th>
		
	   <td>0073002220</td>
	</tr>
    <tr>	
	   <td>0063002220</td>
  </tr>
  </table>
</body>
</html>

 

(Visited 120 times, 1 visits today)
Share with Friends :

Leave a Reply

Your email address will not be published. Required fields are marked *