W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2006

[whatwg] image captions

From: Michel Fortin <michel.fortin@michelf.com>
Date: Tue, 4 Apr 2006 23:20:02 -0400
Message-ID: <751CDD20-EA95-494B-AACB-468617E87205@michelf.com>
Le 4 avr. 2006 ? 21:13, Lachlan Hunt a ?crit :

> Ian Hickson wrote:
>> On Tue, 4 Apr 2006, fantasai wrote:
>>> I'm wondering what WA1 considers appropriate markup for a figure  
>>> with a caption.
>>    <p><img src="image-equivalent-of-text" alt="text"  
>> title="caption"></p>
> That's fairly limited because it doesn't allow markup within the  
> title attribute.  What about extending the <caption> element,  
> currently used with <table>, to <img>, <object> and <embed>?

Something like this?

       <img src="...">
       <caption>Some image found <a href="...">here</a></caption>

I think it's a great idea, but there is a backward-compatibility  
problem: current HTML parsers just ignore the caption element when  
outside a table; you can't style it and it probably is absent from  
the DOM too. Parsing it as XML works, but then the default style  
isn't pretty at all. Here are my two (unstyled) test cases which I  
have tested using WebKit and Gecko:


Michel Fortin
michel.fortin at michelf.com
Received on Tuesday, 4 April 2006 20:20:02 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:46 UTC