
One of the most basic elements in
detailed web design using Cascading Style Sheets is the creation of tables. Tables, as we know, represent relationships between data. CSS authors specify these relationships in the
document language and specify their presentation in the style sheet, in two ways: visually and aurally.
Visual formatting of a table may be created as a rectangular grid of cells. Rows and columns of cells may be organized into row groups and column groups with borders around them. Data may be aligned vertically or horizontally within a cell and align data in all cells of a row or column.
In HTML 4.0, here is an example of a table code:
<! - CODE SAMPLE - !>
<TABLE>
<CAPTION>This is a simple 3x3 table
<TR id="row1">
<TH>Header 1 <TD>Cell 1 <TD>Cell 2
<TR id="row2">
<TH>Header 2 <TD>Cell 3 <TD>Cell 4
<TR id="row3">
<TH>Header 3 <TD>Cell 5 <TD>Cell 6
</TABLE>
<!- END SAMPLE - !>
</textarea>
This code creates the table element, three rows (the TR elements), three header cells (the TH elements), and six data cells (the TD elements). Note that there are as many columns in the table as required by header and data cells.
Cascading Style Sheets Comments