Table tag <table> is very famous tag. Before the division <div> tag, it was mostly used in most of the webpages. Table tag is that tag which enclose entire table and displays rows and column in browser. Table tag is defined as both the column and rows. The following example shows you how the table looks.

<html>
<head>
<title></title>
</head>
<body>
<table border="1" cellpadding="5" cellspacing="5" bgcolor="red">

<tr>
<td colspan="7"></td>
</tr>

<tr>
<td colspan="2"></td>
<td colspan="3"></td>
<td colspan="2"></td>
</tr>

<tr>
<td rowspan="5"></td>
<td colspan="2"></td>
<td colspan="2" rowspan="2"></td>
<td rowspan="3"></td>
<td></td>
</tr>

<tr>
<td colspan="2" rowspan="3"></td>
<td rowspan="3"></td>
<td rowspan="2"></td>
<td rowspan="3"></td>
</tr>

<tr>
<td></td>
</tr>

<tr>
<td colspan="7">Copyright "&c" 2013</td>
</tr>

</table>
</body>
</html>

In the following example you can see the how there has been used the attributes of table tag used. Some of the attributes of table tag like width, height, border, bgcolor, cellspacing, cellpadding and sub-tags <tr>, <th> and also <td> plays vital role in the webpage making. colspan and rowspan attributes are used in only in <td> tag. 

Post a Comment

 
Top