HTML and CSS Reference
In-Depth Information
Figure 8.17
Sample
services.html
Accessibility and Tables
This chapter has introduced two recommended methods to increase the accessibility of
tables:
Focus on Accessibility
WWW
Use <th> elements to indicate column or row headings.
Use the summary attribute on the table element to provide an overview of the
table contents.
If you are coding a simple data (informational) table it is sufficient to code <th> tags to
indicate row or column headers. However, for more complex tables the group recom-
mends specifically associating the table cell values with their corresponding headers.
This technique uses the id attribute (usually in a <th> element) to identify a specific
header cell and the headers attribute in a <td> element. Figure 8.18 shows a table that
has been configured in this manner.
Figure 8.18
This informational
table was coded
with techniques to
improve accessibility
The XHTML code for the table follows:
<table border="1" width="75%" summary="This table lists educational
background. Each row describes educational experience at a specific
school. Columns contain school attended, years, subject, and degree
awarded.">
 
Search WWH ::




Custom Search