Html Table Tags
Html Table Tags :
Html table Tag Properties :
Tables are defined with the
<table> tag. A table is divided into rows (with the <tr> tag),and
each is divided into headings with <th> and data cells with the
<td> tag.<caption> is a child tag of <table> used for giving
a caption for a table.<col> is a child of <table> used for giving
common properties for each column.<colgroup> is a child of <table>
used for giving common properties for multiple columns.
Attributes of table tag:
1. Border :
border size for table.
2. Width :
width of table in pixels or %.
3. Align :
left/right/center.
4. Bgcolor: background color for table.
5. Background
: background image for table.
6. Style :
to provide css properties.
7. Cellspacing
: to specify the space between cells.
8. Cellpadding
: to specify the space between the content and boundary of cells.
9. Frame : void/box/lhs/rhs/above/below/hsides/vsides.
10. “colspan”
ans “rowspan” are the two attributes of <th> and <td> used for
merging multiple columns and rows together.
Html Table Tag Properties Eg:
<html>
<body bgcolor=”maroon”
text=”white”>
<table border=”1” align =
“center” width=”50%” style=”font-family:verdana
;font-size:22px;background-image: url(images/back1.jpg)” cellpadding=”20”>
<caption style=”color:cyan”>
<colgroup span = “2” style
=”color:yellow; text-align:center”></colgroup>
<tr height=”80”>
<th> emp no
<th>emp name
<th>salary
</tr>
<tr height=”60”>
<td> 101
<td> karanam
<td> 120000
</tr>
<tr height=”60”>
<td> 102
<td> chandu
<td> 130000
</tr>
<tr height=”60”>
<td> 104
<td colspan=”2” align=”center”>
chandu</td>
</tr>
<tr height=”80”>
<td colspan=”3”
align=”center”>
<img src=”images/back1.jpg”
width=”550” height=”75”>
</td>
</tr>
</table>
</body>
</html>
hai your site is good. kamal
ReplyDelete