[whatwg] The IMG element, proposing a CAPTION attribute

Elliotte Harold elharo at metalab.unc.edu
Fri Nov 10 08:41:08 PST 2006


Jeff Seager wrote:

> A better way would be to semantically attach the caption or cutline to 
> the image itself, so its display is paired naturally. In this way, the 
> width of the cutline would be dictated (unless overruled in the 
> stylesheet) by the width of the image. I'm suggesting that CAPTION be 
> adopted as a new attribute of the IMG element, as it is already for the 
> TABLE element.

I don't think caption should be an attribute, an element maybe, but not 
an attribute.

The problem is that captions can and do have substructure. For instance, 
a caption might include multiple emphasized or strongly emphasized 
sections. Attributes just aren't powerful enough for this.

Given that, I suspect we're probably better off just using regular 
paragraphs in text with appropriate CSS instructions rather than 
introducing a new element.


-- 
Elliotte Rusty Harold  elharo at metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/



More information about the whatwg mailing list