View Full Version : Is there a caption tag for <img src>?
edgarperez
09-05-2002, 06:30 PM
When I have an image I would like to have a caption for the image that appears right below the imagae. Is there such an animal? I know I can break the line but I would like the caption to be the same witdth of the image.
David Copeland
09-06-2002, 07:48 PM
Typically all images have to be reworked to add the caption. However, using Windows 98 there is a built in freebee titled PAINT and other graphic programs. You could just create a new image that is your caption. Then place the smaller image under the larger image as two different images that appear to be one.
A favorite of mine is:
http://www.lissaexplains.com/forum/index.php
She runs an excellent forum on helping anyone with a html question. If you register, make sure you use your domain email instead of a yahoo or hotmail.
don5408
09-07-2002, 11:12 AM
"When I have an image I would like to have a caption for the image that appears right below the imagae. Is there such an animal?"
Well there *is* a CAPTION tag however that's a supported element in TABLE tags only, it can't be used in an IMG SRC tag. You *could* use the CAPTION tag to do what you want however you would have to place your images in tables:
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<CAPTION ALIGN="center" VALIGN="bottom">caption text</CAPTION>
<TR>
<TD><IMG SRC="yourpic.gif" WIDTH="80" HEIGHT="80" ALT=""></TD>
</TR>
</TABLE>
"I know I can break the line but I would like the caption to be the same witdth of the image."
Well the above would accomplish that, as would just placing your image in a table the same width as your image (with the caption text below the image either within the same cell or in a cell of it's own):
<TABLE BORDER="0" WIDTH="80" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD ALIGN="center"><IMG SRC="yourpic.gif" WIDTH="80" HEIGHT="80" ALT=""><BR>caption text</TD>
</TR>
</TABLE>
- or -
<TABLE BORDER="0" WIDTH="80" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD><IMG SRC="yourpic.gif" WIDTH="80" HEIGHT="80" ALT=""></TD>
</TR>
<TR>
<TD ALIGN="center">caption text</TD>
</TR>
</TABLE>
Don
edgarperez
09-07-2002, 11:43 AM
thanks for the tips
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.