To see the HTML tagging, use the view page source menu item in your browser.
In Firefox, use the right button bring up the pop-up menu that contains the
menu item — but the page cannot be in a frame, you need to use the
right button to view the page in a new tab or a new window.
Tables
Tables are are web page equivalents of spreadsheets. Every table is a sequence
of table rows, TR element and within each row is a sequence of tab data cells,
TD element.
The following is an example with four rows, three columns and a 1-pixel border around
the table and each cell.
Last Name
First name
Age
Smith
John
25
Doe
Joan
53
Solzenitsyn
Alexander
19
Teslya
Leila
25
Table captions
The Caption element can be used to give a name to a table. It can appear
only as the beginning of the table specification.
Members ages
Last Name
First name
Age
Smith
John
25
Doe
Joan
53
Solzenitsyn
Alexander
19
Teslya
Leila
25
Table header element
In place of the TD element, you can use the TH element to specify the items
in the row of table header cells. They are rendered in bold.
Members ages
Last Name
First name
Age
Smith
John
25
Doe
Joan
53
Solzenitsyn
Alexander
19
Teslya
Leila
25
You can use the TH element as the first cell in each row, thereby having
row labels.
Members ages
Last Name
First name
Age
1
Smith
John
25
2
Doe
Joan
53
3
Solzenitsyn
Alexander
19
4
Teslya
Leila
25
Table element attributes
Table element attributes are handled with CSS specification.
TD and TR element attributes
The following shows the attributes that TR and TD elements still have. Other
attributes are now handled with CSS specification.
Column span attribute
A cell can be specified to span across multiple columns. The attribute-value in
the example is colspan=2
TH element spans two columns
Column 1
Column 2
TD element spans two columns
Row span attribute
A cell can be specified to span across multiple rows. The attribute-value in
the example is rowspan=2