Table Tag
Table tag in HTML (<table>) :
Table tag is used to arrange the data in structural format.
Attributes of table tag :
- Id : id of the table tag.
- Name : name of the table tag.
- Height : height of the table.
- Width : width of the table
- Border : border of the table.
- Align : change the alignment of the table(right, left, center).
- Bgcolor : background color of the table.
- Cell padding : It written the space between the content and border.
- Cell spacing : It written the space between border and margin.
Sub tags of table tag :
Caption : heading of the table.
thead : thead don’t have any nature but it goes to top of the table.
tbody : it is alos similar to thead tag, but it goes to middle of the table.
tfoot : It is also similar to thead and tbody, but it goes bottom of the table.
tr : It creates rows in the table.
td : It creates cells and placing the data into the cell.
th (table header) : It is used to create columns and place the content into cell and applying the bold tag and center tag to content.
td Attributes :
- Align : changing the horizontal alignment of text(left, right, center).
- Valign : change the vertical alignment of text (top, bottom, middle).
- Bgcolor : background color for specified cell.
- Rowspan : It is used to combine rows(rowspan=“2”).
- Colspan : Cobain columns.
Example :
No comments:
Post a Comment