Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1

FAQ


8.1 Using Tables on Web Pages^323

<tr>
<th id="school">School Attended</th>
<th id="years">Years</th>
<th id="subject">Subject</th>
<th id="degree">Degree Awarded</th>
</tr>
<tr>
<td headers="school">Schaumburg High School</td>
<td headers="years">2005 - 2009</td>
<td headers="subject">College Prep</td>
<td headers="degree">H.S. Diploma</td>
</tr>
<tr>
<td headers="school">Harper College</td>
<td headers="years">2009 - 2010</td>
<td headers="subject">Internet & Web Development</td>
<td headers="degree">Web Developer Certificate</td>
</tr>
</table>

What about the scopeattribute?

The scopeattribute specifies the association of table cells and table row or column headers. It
is used to indicate whether a table cell is a header for a column (scope="col") or row
(scope="row"). An example of the code for the table in Figure 8.18 that uses this attribute is
shown below.
<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.">
<tr>
<th scope="col">School Attended</th>
<th scope="col">Years</th>
<th scope="col">Subject</th>
<th scope="col">Degree Awarded</th>
</tr>
<tr>
<td>Schaumburg High School</td>
<td>2005 - 2009</td>
<td>College Prep</td>
<td>H.S. Diploma</td>
</tr>
<tr>
<td>Harper College</td>
<td>2009 - 2010</td>
<td>Internet & Web Development</td>
<td>Web Developer Certificate</td>
</tr>
</table>
Free download pdf