Chapter 8 (Table Markup)
Chapter 8 (Table Markup)
Table Markup
Content 2
• One fundamental feature of table structure is cell spanning, which is the stretching of a
cell to cover several rows or columns.
• You make a header or data cell span by adding the colspan or rowspan attributes.
Spanning Cells 6
• One fundamental feature of table structure is cell spanning, which is the stretching of a
cell to cover several rows or columns.
• You make a header or data cell span by adding the colspan or rowspan attributes.
Table Accessibility 7
• As a web designer, it is important that you always keep in mind how your site’s content
is going to be used by visitors with impaired sight.
• The caption element must be the first thing within the table element to describe table
content:
Table Accessibility… 8
• The scope and headers attributes allow authors to explicitly associate headers and
their respective content.
• Scope
• The scope attribute associates a table header with the row, column, group of rows
(such as tbody), or column group in which it appears by using the values row, col,
rowgroup, or colgroup, respectively.
Table Accessibility… 9
• headers
• The headers attribute is used in the td element to explicitly tie it to a header’s id value:
Row and Column Groups 10
• You can identify three groups of columns (one with headers, two with two columns
each), and three groupings of rows (headers, data, and a footnote).
• Conceptual table groupings like these are marked up with row group and column
group elements that provide additional semantic structure for styling or scripting.
Row and Column Groups 11
• Column groups are identified at the start of the table, just after the caption if there is
one, and they give the browser a little heads-up as to the column arrangement in the
table. The number of columns a colgroup represents is specified with the span
attribute.
Thank you