W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2009

[whatwg] <figure><img><* caption>

From: Kornel Lesiński <kornel@geekhood.net>
Date: Tue, 1 Dec 2009 15:15:55 +0000
Message-ID: <C8C546B5-32C5-4079-8F9F-0761A4A44D1F@geekhood.net>
On 1 Dec 2009, at 14:33, Nikita Popov wrote:

> As caption and legend have much too many backwards compatibility  
> issues

It's not bad I think. I've played a little with the live DOM viewer  
and this seems usable:

   <caption><div class=caption>foo</div></caption>

caption start/end tag is completely ignored, so at lest there's no  
negative side effect. You only need another styling hook. It's not any  
worse than suggested hack for <dd>.

To ease transition, HTML5 might allow wrapping <caption> in <table>  
without any rows:


This gives good DOM and styling in all browsers (with createElement  
hack in IE of course).

This caption can be styled differently from real table captions using  
caption:only-child selector.

Saying that caption of table in figure is also figure's caption IMHO  
makes sense even for real tables (is there a need for doubly-captioned  

regards, Kornel
Received on Tuesday, 1 December 2009 07:15:55 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:19 UTC