[Web4lib] how to add a caption to a photo
Thomas Dowling
tdowling at ohiolink.edu
Thu Dec 15 09:17:06 EST 2005
Petter Naess wrote:
> Here is a simple question to which I hope there is a simple answer....
> When adding an image to a webpage, is their some easy way to add a small
> caption under the picture? One can of course put the picture in a table and
> include an extra row, into which one types the caption, but I should think
> an html editor (such as Dreamweaver 4, which I use) would have a window,
> similar to the "alt text" window, where one could conveniently add the
> caption text. I'm grateful for any suggestions!
>
The late lamented HTML 3.0 draft (in no way related to HTML 3.2)
proposed a figure element with a sub-elements for captions and credits,
but nothing ever came of it. Your best bet is probably something like:
<div class="figure-and-caption">
<p class="figure"><img src="foo.png"
alt="Foo"
title="Giant Foo Bird of the Andes"
longdesc="full-description-and-credits.html"></p>
<p class="caption">Giant Foo Bird of the Andes. Photograph
by J. Allen Bar, courtesy of the Baz Archive.</p>
</div>
CSS as per your institutional style guide or innate aesthetic sense.
--
Thomas Dowling
tdowling at ohiolink.edu
More information about the Web4lib
mailing list