E-mail List Archives
Thread: RE: caption?
Number of posts in this thread: 2 (In chronological order)
From: Jukka Korpela
Date: Sun, May 05 2002 11:37PM
Subject: RE: caption?
No previous message | Next message →
Raja Saravanan wrote:
> I guess you can try the label tag for that
>
> <label FOR="myImage"> <<your caption here>> </label>
>
> <img id="myImage" src="../../img001.jpg" alt="My photo">
That's an interesting idea, but unfortunately the <label> element is for
specifying labels for form fields (or "controls", to use the HTML 4 jargon)
only. There's no definition of what it should mean for images, for example,
and no consistent treatment by browsers.
Unfortunately there is no structured markup for image captions in HTML.
Usually authors use a table, with the image in one cell and the caption text
in another cell below it:
<table>
<tr><td><img alt="..." src="..."></td></tr>
<tr><td>Your caption here</h></tr>
</table>
(Probably to be accompanied with presentational attributes and/or CSS rules
to tune the visual appearance.)
This might even be regarded as "tabular data", or genuine (structural)
table, stretching a bit; it would then be logical to use <th> markup for the
cell containing the caption. But in practical terms, it wouldn't help much,
I'm afraid. The visual appearance might give sufficient clue of the intended
relationship, but non-visual user agents couldn't deal with it very well.
--
Jukka Korpela
TIEKE Tietoyhteiskunnan kehitt
From: Steven Splinter
Date: Tue, May 07 2002 4:49PM
Subject: Re: caption?
← Previous message | No next message
One idea I've used is to put the image in a single-cell table, and then use the
caption within the table cell. Would that meet accessibility?
Jukka Korpela wrote:
> Unfortunately there is no structured markup for image captions in HTML.
> Usually authors use a table, with the image in one cell and the caption text
> in another cell below it:
>
> <table>
> <tr><td><img alt="..." src="..."></td></tr>
> <tr><td>Your caption here</h></tr>
> </table>
>
> (Probably to be accompanied with presentational attributes and/or CSS rules
> to tune the visual appearance.)
>
> This might even be regarded as "tabular data", or genuine (structural)
> table, stretching a bit; it would then be logical to use <th> markup for the
> cell containing the caption. But in practical terms, it wouldn't help much,
> I'm afraid. The visual appearance might give sufficient clue of the intended
> relationship, but non-visual user agents couldn't deal with it very well.
--
-Steven Splinter
UMass Dartmouth Web Development
= EMAIL ADDRESS REMOVED =
508-910-6483
----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/