[whatwg] image captions

Le Tue, 27 Jun 2006 13:00:21 +0300, dolphinling <lists at dolphinling.net> a  
?crit:

> fantasai wrote:
>> I'm wondering what WA1 considers appropriate markup for
>> a figure with a caption.
>>  ~fantasai
>
> What's wrong with
>
> <div>
>    <img src="">
>    <p>This is the caption.</p>
> </div>
>
> ? That's how I think of it semantically, and I don't see it as being  
> common enough to warrant a separate element of its own.
>

There's nothing "wrong" with that. Yet, that's not exactly an image  
caption. There's no explicit association between the <img> and the  
following <p>.

Quick idea:

<img src="" caption="fig1">
<p id="fig1">This is the caption.</p>

How about this? It's backwards compatible. Maybe this has already been  
suggested (apologies if this is the case).



-- 
http://www.robodesign.ro
ROBO Design - We bring you the future

Received on Tuesday, 27 June 2006 04:11:36 UTC