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

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 UTC