Re: [XHTML2] Suggestion: generalize CAPTION element

Bert Bos:
>
> It seems to me that associating a caption with an image is such a
> fundamental operation, that it should be expressed by semantic
> mark-up, rather than by visual proximity (or other purely stylistic
> means).

I agree that this is one of the most missed features of current HTML.

The minimal content model for the 'object' element is

  (caption?, (PCDATA | Flow | param)*),

thus it's already possible--in the current draft--to caption an image with
the prefered element for image inclusion.

>     <div class=figure>
>       <p><img src=...>
>       <p class=caption>...
>     </div>

I once tried to justify that Ruby could be used for this.
<http://webdesign.crissov.de/ruby-hack> (German, but it's the code and the
examples that matter.) It turned out that the best working solution with all
Ruby elements used adds about as much code as one- or two-cell tables.

> but that DIV.figure is no more than a convention and any parser would
> have to know that the author is me in order to understand that the
> text and the image have any special relation.

That's the [only] advantage of using Ruby for this.

> I think Google's image search could be significantly improved
> if its robots knew how to recognize captions.

They should at least take the title attribute into account. And people
should correctly use it for now.

> So I'm asking that XHTML not only generalizes the SRC attribute, but
> also the CAPTION element:

What about 'param'?

> PS. It is not clear how the above could be handled with CSS.

The same like the current 'caption' element for 'table' is handled?

Christoph

Received on Tuesday, 4 February 2003 12:14:52 UTC