W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: Why legend has been preferred to caption for figures (was: 3.15 Tabular Data Review)

From: Robert Burns <rob@robburns.com>
Date: Tue, 17 Jul 2007 17:30:21 -0500
Message-Id: <DEEABAC8-919C-4CDC-9AA6-BD904B6F2CEA@robburns.com>
Cc: public-html@w3.org
To: Thomas Broyer <t.broyer@gmail.com>


On Jul 17, 2007, at 5:25 PM, Thomas Broyer wrote:

>
> 2007/7/18, Robert Burns:
>>
>> I wonder if this wording is a vestige of considering <caption> for
>> <figure> elements (apparently rejected for <legend> because of some
>> unspecified parsing issues).
>
> Try this: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C 
> %21DOCTYPE%20html%3E%0A%3Cstyle%3E%0Atable%20caption%20%7B%20color% 
> 3A%20red%3B%20%7D%0Atable%20td%20caption%20%7B%20color%3A%20green%3B 
> %20%7D%0A%3C/style%3E%0A%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Cfigure%3E% 
> 3Cimg%20src%3D%22image%22%20alt%3D%22cats%22%3E%3Ccaption%3EKittens% 
> 3C/caption%3E%3C/figure%3E%3C/td%3E%3C/tr%3E%3C/table%3E
>
> i.e.
> <!DOCTYPE html>
> <style>
> table caption { color: red; }
> table td caption { color: green; }
> </style>
> <table><tr><td><figure><img src="image"
> alt="cats"><caption>Kittens</caption></figure></td></tr></table>
>
> Firefox 2 and Opera 9.21 move <caption> as a direct child of the  
> <table>.
> IE7 seems to imply cell, row and row-group end tags so that <caption>
> is a direct child of <table>
>

Thanks. that clears that up. Safari shows no caption in the DOM  at  
all as far as I can tell.

Take care,
Rob
Received on Tuesday, 17 July 2007 22:31:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT