TABLE ELEMENT
In order to display the data in shape of table we need to the different kind of tags which will help to form the table.Some time the table become long that we need to scroll the page down for this to avoid different anomaly we used the Header and Footer option of the Microsoft Word. There are three sub elements of the Table element that helps in dividing the table into header, footer and the body.
| Elements | Description |
|---|---|
| THEAD | Defines a table's header. |
| TFOOT | Defines a table's footer. |
| TBODY | Defines a table's content (body). |
You can also group the columns of a table by using the COLGROUP element inside TABLE element. You can specify the number of columns for a column group in either of the two ways by using
- The Span attribute of the COLGROUP element : sets the number of columns in the group. Its default value is 1.
- The COL element in the COLGROUP element: Specifies one or more columns in the group.
You must specify the COLGROUP element immediately after the Table element, then THEAD, TFOOT and then the TBODY.
Here is the simple code:
<table border="3">
<colgroup span="3" width="300">
</colgroup>
<thead>
<tr>
<th>Student Name
</th><th>Grand Total (Out of 500)
</th><th>Percentage
</th></tr>
</thead>
<tfoot>
<tr>
<th>Total Student
</th><th>4
</th><th></th></tr>
</tfoot>
<tbody>
<tr>
<td>Saif
</td><td>450
</td><td>90%
</td></tr>
<tr>
<td>Ajmal
</td><td>40
</td><td>80%
</td></tr>
<tr>
<td>Saif
</td><td>452
</td><td>86%
</td></tr>
</tbody></table>
<colgroup span="3" width="300">
</colgroup>
<thead>
<tr>
<th>Student Name
</th><th>Grand Total (Out of 500)
</th><th>Percentage
</th></tr>
</thead>
<tfoot>
<tr>
<th>Total Student
</th><th>4
</th><th></th></tr>
</tfoot>
<tbody>
<tr>
<td>Saif
</td><td>450
</td><td>90%
</td></tr>
<tr>
<td>Ajmal
</td><td>40
</td><td>80%
</td></tr>
<tr>
<td>Saif
</td><td>452
</td><td>86%
</td></tr>
</tbody></table>
Here is the result shown below:
| Student Name | Grand Total (Out of 500) | Percentage |
|---|---|---|
| Total Student | 4 | |
| Saif | 450 | 90% |
| Ajmal | 40 | 80% |
| Saif | 452 | 86% |
AoA, My new website is Brand Consciousness.Kindly visit this address http://brandmanics.blogspot.com/2013/06/blog-post.html
ReplyDeleteI hope you will like it and do share your views too.
Thanks!
my name is haseeb and my wed page address is http://oldbookfair.blogspot.com/
ReplyDeletemy name is shoaib ahmad and my webpage address is http://callmanagment.blogspot.com/
ReplyDeleteAoA,
ReplyDeleteThis is Sajjad, attached is a link to my "sample table."
http://sajjadclasswork.blogspot.com/2013/06/learning-to-create-table.html