Ryan's District Boards

Computer, programming, and webmaster help , support , tips and tricks => Internet webmaster computer programming technology tips and tricks => Topic started by: charleychacko on October 13, 2006, 01:46:47 PM

Title: Describing tables using the SUMMARY attribute in TABLE tags
Post by: charleychacko on October 13, 2006, 01:46:47 PM
Remember the ALT attribute in IMG tags? The SUMMARY attribute in TABLE tags serve a similar purpose, in that it will provide a description of the table to users of non-visual browsers. Unlike the ALT tag, Explorer 4.x, Communicator 4.x and lower browsers do not use the SUMMARY tag to display pop-up hints when the mouse is paused over the table.

     NOTE: You may not see a visual change by adding the SUMMARY attribute if you're using a graphical browser. However, HTML authors concerned about their content being accessible in different mediums and users with disabilities, for example, are advised to use provide a summary of the table. 


Following is an example of a table with the SUMMARY attribute defined.

     


HTML code used to create the above table:

<table

  SUMMARY="Red, green and blue rectangles"

  border=1>

<tr>
<td bgcolor=red>&nbsp;</td>
<td bgcolor=green>&nbsp;</td>
<td bgcolor=blue>&nbsp;</td>
</tr>

</table>
Listing #2 : HTML code. Download summary (0.24 KB).

     TIP: Use the TITLE attribute for tables to create pop-up hints containing descriptions you provide. 


W3C - HyperText Markup Language
Current HTML recommendations from the World Wide Web Consortium.
Listing #1 : HTML References