A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Image Caption Examples: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
(Adding a reference to the mailing list archive)
mNo edit summary
Line 30: Line 30:
----
----


MacWorld magazine website uses two-row tables to add a caption to screenshots in [http://www.macworld.com/2006/06/firstlooks/flciviv/index.php this article]. Interestingly, they're not using the <caption> element with is meant to be used inside <table>. By using it, they could have saved themselves the trouble of specifying a width for each of their screenshots without having the image description extending the table. Here is a simplified version of the markup used on this page:
MacWorld magazine website uses two-row tables to add a caption to screenshots in [http://www.macworld.com/2006/06/firstlooks/flciviv/index.php this article]. Interestingly, they're not using the
 
<pre>
<table width="310" align="right">
<tr><td>
  <img src="...">
</td></tr>
<tr><td>
  <p>[Caption Text or Image Description]</p>
</td></tr>
</table>
</pre>
 
----
 
Wikipedia thumbnail image with caption can be reduced to this once the links are removed:
 
<pre>
<div class="thumb tright">
  <img src="..." alt="[Caption Text]" longdesc="..." />
  <div class="thumbcaption">
    [Caption Text]
  </div>
</div>
</pre>
 
----
 
Some documents ([http://www.stanford.edu/group/hopes/basics/basichd/a2.html example]) simply put the caption text inside the image.
 
== Other Examples ==
 
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_paths/chapter_4_section_2.html
 
<pre>
<div>
  <a name="..." title="[Caption Text]"></a>
  <p>[Caption Text]</p>
  <img src="..." alt="[Caption Text]">
</div>
</pre>
 
----
 
http://medicine.plosjournals.org/perlserv?request=get-document&doi=10.1371/journal.pmed.0020228
 
<pre>
<div class="figureFM">
  <a name="..." id="..."></a>
  <img src="..."/>
  <h5>[Caption Text]</h5>
</div>
</pre>
 
----
 
http://www.darsie.net/string/
 
<pre>
<table WIDTH="346">
<tr><td>
  <img align=top src="..." ALT="Photo of Position 1">
</td></tr>
<tr><td>
  Position 1
</td></tr>
</table>
</pre>
 
== Mailing List References ==
* [http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2006-June/006828.html Rep: image captions], 27 June 2006 -- Michel Fortin

Revision as of 11:53, 13 July 2007

This page is a collection of sample usage for images with captions from around the web. Markup samples provided here have been reformatted and often simplified by removing presentational elements to better illustrate what "defines" the figure in them.

These real-world examples provides support for the Image Caption proposal.


Some images in the CSS 2.1 specification (example 1, example 2) use class names to add captions to figures. Reduced to a simpler form, the markup looks like this:

<div class="figure">
  <p><img src="..." alt="[caption text]">
  <p class="caption">[Caption Text]
</div>

(Note: Removed form this simplified markup is the [D] link to a long description that was put beside the image.)


Articles form the Salon.com magazine (example) use this markup for accompaniment photographs:

<div class='article_photo_right'>
<img src='...'><br />
<p class='article_photo_credit'>Photo: [Photograph's Name]</p>
<p class='article_photo_caption'>[Caption Text]</p>
</div>

MacWorld magazine website uses two-row tables to add a caption to screenshots in this article. Interestingly, they're not using the