Using the abbr Attribute

 < Day Day Up > 



In the preceding example, let's say that you thought the header "Season Record (W-L)" was a bit too long for a speech synthesizer to read out. By adding the abbr attribute, we can shorten what is actually read to whatever we'd like, while keeping the original text in the <th> cell for visual browsers.

 <table summary="This table is a chart of all Boston Red Sox World Series wins.">   <caption>Boston Red Sox World Series Championships</caption>   <tr>      <th >Year</th>      <th >Opponent</th>      <th  abbr="Record">Season Record (W-L)</th>   </tr>   <tr>      <td>1918</td>      <td>Chicago Cubs</td>      <td>75-51</td>   </tr>   <tr>      <td>1916</td>      <td>Brooklyn Robins</td>      <td>91-63</td>   </tr>   <tr>      <td>1915</td>      <td>Philadelphia Phillies</td>      <td>101-50</td>   </tr>   <tr>      <td>1912</td>      <td>New York Giants</td>      <td>105-47</td>   </tr> </table> 

We've added abbr="Record" so that screen readers will use that shortened version ("Record") of the table header when speaking out the data of that particular cell.



 < Day Day Up > 



Web Standards Solutions. The Markup and Style Handbook
Web Standards Solutions: The Markup and Style Handbook (Pioneering Series)
ISBN: 1590593812
EAN: 2147483647
Year: 2003
Pages: 119
Authors: Dan Cederholm

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net