Home | CSS | Tables | Images | Typography | Layout | Devices | Color Theory | Forms | Features | Resoures | Access |
A table contains rows, columns,and cells. Each section of the table is defined by tags, see below in the table tags table. Tables always begin with a <table> tag. The width and border elements ae attributes of the <table> tag. The <tr> is a row tag, <td> is a cell tag, <th> is a table header tag. You do not have to define columns with XHTML tags.
The most popular way to control layout of a Web site is with a table. A table is a highly versaltile feature in XHTML. Tables are a useful tool used to organize charts, data, and positioning page elements. The tab key lets you quickly move through a table. As you make a table you need to put something in a cell in order to preserve the table formatting; and avoid collapsing empty cells in browsers.
Borders are one of the most basic controls you have over the appearance of tables. You can personalize borders as much as you personalize your site. Cell spacing, space between cells, and cell padding, margin in/of cells is also a way to customize a table. Table headings have a scope attribute that tells screen readers and other accessibility device that the <th> tag applies to either a column (scope="col") or row (scope="row").
| Tag | Use |
|---|---|
| <table> | The <table> tag determines the start and end of a table. You can specify the entire width of the table, whether the table has a border, and the spacing to place between table cells. |
| <caption> | The <caption> tag places a text heading above the table, which labels the table for reference. For instance, a table containing a third-quarter financial report might have a caption of Q3 Financials. |
| <tr> | The <tr> tag defines the start and end of a table row. |
| <th> | The <th> tag defines a table header, which acts as a label for a group of table cells, whether they're in a row or a column. |
| <td> | The <td> tag defines a standard table cell. |
Home | CSS | Tables | Images | Typography | Layout | Devices | Color Theory | Forms | Features | Resoures | Access |