Breaking News

Example on the colspan and rowspan

Here you can see what the colspan and rowspan do.
Just write/copy this example on any text editor new file and save the file and open in the browser and see how it looks.
 
Example:
 
<html>
<body>
This table has a caption,and a thick border,<h4>Cell that spans two columns:</h4>
<table border=”6″>
<caption>My Caption</caption>
<tr>
<th>Name</th>
<th colspan=”2″>Telephone</th>
</tr>
<tr>
<td>XYZ</td>
<td>011 273 994</td>
<td>011 274 465</td>
</tr>
</table> <h4>Cell that spans two rows:</h4>
<table border=”1″>
<tr>
<th>First Name:</th>
<td>XYZ</td>
</tr>
<tr>
<th rowspan=”2″>Telephone:</th>
<td>011 273 994</td>
</tr>
<tr>
<td>011 274 465</td>
</tr>
</table>
</body>
</html>
 
Your above web page in the web browser looks like:
 
 
Click here! to see the Animation of how to create the above web page.
 
 
 

Check Also

Table Tags

Table Tags   Tag Description <table> Defines a table <th> Defines a table header <tr> …