HTML and CSS Reference
As you reviewed the code sample above, you may have noticed that using the scope attribute to
provide for accessibility requires less coding than implementing the headers and id attributes.
However, due to inconsistent screen reader support of the scope attribute, the W3C's Web
Accessibility Initiative (WAI) WCAG 2.0 recommendations for coding techniques encourage the
use of headers and id attributes rather than the scope attribute.
There are lots of configuration options when coding tables. Table rows can be put
together into three types of table row groups: table head ( <thead> ), table body
( <tbody> ), and table footer ( <tfoot> ). This can be useful when you need to configure
the areas in the table in different ways, using either attributes or CSS (see Section 8.3).
The <tbody> tag is required if you configure a <thead> or <tfoot> area, although
you can omit either the table head or table footer if you like. The code sample below
(see student files Chapter8/tables/tablesections.html) configures the table shown in
Figure 8.18 using <thead> and <tbody> groups.
<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
<td>Schaumburg High School</td>
<td>2005 - 2009</td>
<td>2009 - 2010</td>
<td>Internet & Web Development</td>
<td>Web Developer Certificate</td>
When you use table row groups, the <thead> and <tfoot> sections must be coded
before the <tbody> section to pass W3C XHTML validation. See Chapter8/tables/
tfoot.html for an example.