The <table> tag in HTML is used to create tables. Tables are used to display data in a tabular format. The <table> tag has several attributes that can be used to control the appearance and layout of the table.
The most common attributes of the <table> tag are:
- border: This attribute specifies the thickness of the border around the table.
- cellpadding: This attribute specifies the amount of space between the cell content and the cell borders.
- cellspacing: This attribute specifies the amount of space between the cells.
- width: This attribute specifies the width of the table.
- height: This attribute specifies the height of the table.
The <table> tag can contain two types of elements: <tr> and <td>. The <tr> element is used to create a row in the table. The <td> element is used to create a cell in the table.
The <tr> element has several attributes that can be used to control the appearance and layout of the row. The most common attributes are:
- bgcolor: This attribute specifies the background color of the row.
- align: This attribute specifies the alignment of the text in the row.
- valign: This attribute specifies the vertical alignment of the text in the row.
The <td> element has several attributes that can be used to control the appearance and layout of the cell. The most common attributes are:
- bgcolor: This attribute specifies the background color of the cell.
- align: This attribute specifies the alignment of the text in the cell.
- valign: This attribute specifies the vertical alignment of the text in the cell.
- width: This attribute specifies the width of the cell.
- height: This attribute specifies the height of the cell.
Name | Age | Occupation |
John Doe | 30 | Software Engineer |
Jane Doe | 25 | Teacher |
No comments:
Post a Comment