HTML Tables are very user friendly they are used to display a set of records from database or to create a good look for a form.Table is created using "table" tag and it also has the closing tag.
Table has the attribute of height,width,cellpadding,cellspacing and border.
Height is used to set the height of the table
Width is used to set the width of the table
Cellpadding is the space between the cell and the text of the cell
Cellspacing is the space between adjacent cells
Border is used to set the border of table
Table includes table row and table cell indicated as tr and td.
TH tag is used to define the heading of columns
TR tag is used to start a new row and dislpay the data
TD tag is used to define the data of cell
Example
This results in following table
| Name | Age |
|---|---|
| abc | 22 |
| xyz | 25 |
For every next row the current row has to be closed and new row has to be opened
No comments:
Post a Comment