News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

Describing tables using the SUMMARY attribute in TABLE tags

Started by charleychacko, October 13, 2006, 01:46:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

charleychacko

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