[whatwg] image captions

Michel Fortin michel.fortin at michelf.com
Thu Jun 29 03:55:41 PDT 2006


Le 28 juin 2006 à 21:17, Lachlan Hunt a écrit :

> Michel Fortin wrote:
>
>>     <figure>
>>       <caption>Figure 1: Some image</caption>
>>       <img src="...">
>>     </figure>
>
> [...]
>
> The only problem is that it isn't very backwards compatible.   
> Firefox doesn't include <caption> in the DOM outside of a table.   
> Moving the caption after the image in the source and setting  
> display: block; on the image gives reasonable results in Firefox  
> and Opera because the img is a child of figure, but not in IE  
> because figure and img are treated as siblings.

I have exposed this problem previously (look back at this thread in  
April). In fact, my first thought was that this was a show-stopper  
for that particular syntax and that a substitue ought to be found.

Then I realised that, contrary to my first belief, others elements in  
the current draft -- namely <section>, <nav>, <header>, <footer>,  
<aside>, and maybe others -- aren't backward compatible either  
because they can't contain even a paragraph, at least in Safari and  
Firefox.

Will this prevent <section> and others from being adopted? I doubt  
it. Should this prevent a <figure> element from being adopted? I  
don't think so.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/





More information about the whatwg mailing list