1460 Introduction to XHTML: Part (Web site) 2 Appendix L
1460 Introduction to XHTML: Part 2 Appendix L The foot section (lines 58 63) is defined with a tfoot (table foot) element and represents a footer. Text commonly placed in the footer includes calculation results and footnotes. Like other sections, the foot section can contain table rows and each row can contain columns. L.3 Intermediate XHTML Tables and Formatting In the previous section, we explored the structure of a basic table. In Fig. L.2, we enhance our discussion of tables by introducing elements and attributes that allow the document author to build more complex tables. The table begins on line 17. Element colgroup (lines 22 27) groups and formats columns. The col element (line 26) specifies two attributes in this example. The align attribute determines the alignment of text in the column. The span attribute determines how many columns the col element formats. In this case, we set align s value to “right”and span s value to “1″to right-align text in the first column (the column containing the picture of the camel in the sample screen capture). Table cells are sized to fit the data they contain. Document authors can create larger data cells by using attributes rowspan and colspan. The values assigned to these attributes specify the number of rows or columns occupied by a cell. The th element at lines 36 39 uses the attribute rowspan=”2″ to allow the cell containing the picture of the camel to use two vertically adjacent cells (thus the cell spans two rows). The thelement at lines 42 45 uses the attribute colspan=”4″to widen the header cell (containing Camelidcomparisonand Approximateasof9/2002) to span four cells. 1 2 4 5 6 7 8 9
10 11 12 13 14 15Table Example Page
16 17