[whatwg] The IMG element, proposing a CAPTION attribute

Dan Brickley danbri at danbri.org
Fri Nov 10 10:49:55 PST 2006


Elliotte Harold wrote:
> 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.

I agree, attributes are too weak (eg. couldn't support 
http://www.w3.org/TR/ruby/ ).

Dan



More information about the whatwg mailing list