<?xml version="1.0" encoding="utf-8"?><!-- generator="wordpress/2.1.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Image captions in XHTML</title>
	<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/</link>
	<description>Darren Brierton's Blog</description>
	<pubDate>Mon, 01 Dec 2008 19:24:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>

	<item>
		<title>By: Chris</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-41</link>
		<author>Chris</author>
		<pubDate>Wed, 09 Feb 2005 21:35:54 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-41</guid>
					<description>Crikey - and I thought little girls were made of sugar, spice and all things nice.  Darren - please can you teach me code?&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;</description>
		<content:encoded><![CDATA[<p>Crikey - and I thought little girls were made of sugar, spice and all things nice.  Darren - please can you teach me code?<!-- X-spaminator-strike: whitelist, -3 --><!-- X-spaminator-passed: IP check --><!-- X-spaminator-passed: email check --><!-- X-spaminator-strike: empty field, 1 --><!-- X-spaminator-passed: author url --><!-- X-spaminator-passed: comment body --></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Kris</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-42</link>
		<author>Kris</author>
		<pubDate>Wed, 09 Feb 2005 21:46:58 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-42</guid>
					<description>The correctness of this visual presentation has nothing to do with CSS.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;</description>
		<content:encoded><![CDATA[<p>The correctness of this visual presentation has nothing to do with CSS.<!-- X-spaminator-strike: whitelist, -3 --><!-- X-spaminator-passed: IP check --><!-- X-spaminator-passed: email check --><!-- X-spaminator-strike: empty field, 1 --><!-- X-spaminator-passed: author url --><!-- X-spaminator-passed: comment body --></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Darren Brierton</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-43</link>
		<author>Darren Brierton</author>
		<pubDate>Wed, 09 Feb 2005 23:00:29 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-43</guid>
					<description>Heh. I'm pleased you liked the picture Kris. And Chris, just keep reading. I think I'm going to make the "Tips'N'Tricks" thing a regular feature.&lt;!-- X-spaminator-strike: whitelist, -3 --&gt;&lt;!-- X-spaminator-passed: IP check --&gt;&lt;!-- X-spaminator-passed: email check --&gt;&lt;!-- X-spaminator-strike: empty field, 1 --&gt;&lt;!-- X-spaminator-passed: author url --&gt;&lt;!-- X-spaminator-passed: comment body --&gt;</description>
		<content:encoded><![CDATA[<p>Heh. I&#8217;m pleased you liked the picture Kris. And Chris, just keep reading. I think I&#8217;m going to make the &#8220;Tips&#8217;N'Tricks&#8221; thing a regular feature.<!-- X-spaminator-strike: whitelist, -3 --><!-- X-spaminator-passed: IP check --><!-- X-spaminator-passed: email check --><!-- X-spaminator-strike: empty field, 1 --><!-- X-spaminator-passed: author url --><!-- X-spaminator-passed: comment body --></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Darren Brierton</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-44</link>
		<author>Darren Brierton</author>
		<pubDate>Wed, 09 Feb 2005 23:02:10 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-44</guid>
					<description>&lt;strong&gt;Footnote/Addendum---more on the &lt;code&gt;&#60;dl&#62;&lt;/code&gt; element:&lt;/strong&gt;

In the original post I simplified things slightly. I said that a &lt;code&gt;&#60;dl&#62;&lt;/code&gt; element contained pairs (indeed, I implied that they were &lt;em&gt;ordered&lt;/em&gt; pairs) of &lt;code&gt;&#60;dt&#62;&lt;/code&gt; and &lt;code&gt;&#60;dd&#62;&lt;/code&gt; elements. However, that is not required by the &lt;abbr title="Document Type Definition"&gt;DTD&lt;/abbr&gt;. The semantics of definition lists is implicit rather than explicit. A &lt;code&gt;&#60;dl&#62;&lt;/code&gt; element can contain any old mish-mash of &lt;code&gt;&#60;dt&#62;&lt;/code&gt; and &lt;code&gt;&#60;dd&#62;&lt;/code&gt; elements and still be valid. It might not, however, make any &lt;em&gt;sense&lt;/em&gt; (compare the sentence "All green ideas sleep furiously"---it's syntactically (grammatically) correct, i.e. it conforms to the "&lt;abbr&gt;DTD&lt;/abbr&gt;" for English, it just doesn't mean anything). In particular, these next two examples are perfectly valid but quite meaningless:

A term with no description:

&lt;pre&gt;&lt;code&gt;&#60;dl&#62;
  &#60;dt&#62;
    foo
  &#60;/dt&#62;
&#60;/dl&#62;&lt;/code&gt;&lt;/pre&gt;

A description with no term:

&lt;pre&gt;&lt;code&gt;&#60;dl&#62;
  &#60;dd&#62;
    bar
  &#60;/dd&#62;
&#60;/dl&#62;&lt;/code&gt;&lt;/pre&gt;

The semantics of definition lists is &lt;em&gt;implicit&lt;/em&gt; in the &lt;em&gt;ordering&lt;/em&gt; of the &lt;code&gt;&#60;dt&#62;&lt;/code&gt; and &lt;code&gt;&#60;dd&#62;&lt;/code&gt; elements (as opposed, say, to it being made &lt;em&gt;explicit&lt;/em&gt; through the use of &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;idref&lt;/code&gt; attributes, or through nesting the elements). So, this next example also makes no sense:

A description &lt;em&gt;preceding&lt;/em&gt; the term it describes:

&lt;pre&gt;&lt;code&gt;&#60;dl&#62;
  &#60;dd&#62;
    bar
  &#60;/dd&#62;
  &#60;dt&#62;
    foo
  &#60;/dt&#62;
&#60;/dl&#62;&lt;/code&gt;&lt;/pre&gt;

However, more than one term can be associated with a single description, and more than one description can be associated with a term, in ways which are both valid and meaningful:

&lt;pre&gt;&lt;code&gt;&#60;dl class="dictionary"&#62;
  &#60;dt&#62;
    bank
  &#60;/dt&#62;
  &#60;dd&#62;
    1. Somewhere you deposit your money.
  &#60;/dd&#62;
  &#60;dd&#62;
    2. The side of a river.
  &#60;/dd&#62;
  &#60;dt&#62;
    geek
  &#60;/dt&#62;
  &#60;dt&#62;
    nerd
  &#60;/dt&#62;
  &#60;dd&#62;
    Someone who is just misunderstood by the computer
    illiterate imbeciles around them.
  &#60;/dd&#62;
&#60;/dl&#62;&lt;/code&gt;&lt;/pre&gt;

Definition lists are one of the most underused parts of &lt;abbr&gt;XHTML&lt;/abbr&gt;, which is a shame as they are a powerful tool. However, their implicit semantics also indicate why &lt;abbr&gt;XHTML&lt;/abbr&gt;, whilst being far more semantically expressive than most people give it credit for, is also quite semantically weak.</description>
		<content:encoded><![CDATA[<p><strong>Footnote/Addendum&#8212;more on the <code>&lt;dl&gt;</code> element:</strong></p>
<p>In the original post I simplified things slightly. I said that a <code>&lt;dl&gt;</code> element contained pairs (indeed, I implied that they were <em>ordered</em> pairs) of <code>&lt;dt&gt;</code> and <code>&lt;dd&gt;</code> elements. However, that is not required by the <abbr title="Document Type Definition">DTD</abbr>. The semantics of definition lists is implicit rather than explicit. A <code>&lt;dl&gt;</code> element can contain any old mish-mash of <code>&lt;dt&gt;</code> and <code>&lt;dd&gt;</code> elements and still be valid. It might not, however, make any <em>sense</em> (compare the sentence &#8220;All green ideas sleep furiously&#8221;&#8212;it&#8217;s syntactically (grammatically) correct, i.e. it conforms to the &#8220;<abbr>DTD</abbr>&#8221; for English, it just doesn&#8217;t mean anything). In particular, these next two examples are perfectly valid but quite meaningless:</p>
<p>A term with no description:</p>
<pre><code>&lt;dl&gt;
  &lt;dt&gt;
    foo
  &lt;/dt&gt;
&lt;/dl&gt;</code></pre>
<p>A description with no term:</p>
<pre><code>&lt;dl&gt;
  &lt;dd&gt;
    bar
  &lt;/dd&gt;
&lt;/dl&gt;</code></pre>
<p>The semantics of definition lists is <em>implicit</em> in the <em>ordering</em> of the <code>&lt;dt&gt;</code> and <code>&lt;dd&gt;</code> elements (as opposed, say, to it being made <em>explicit</em> through the use of <code>id</code> and <code>idref</code> attributes, or through nesting the elements). So, this next example also makes no sense:</p>
<p>A description <em>preceding</em> the term it describes:</p>
<pre><code>&lt;dl&gt;
  &lt;dd&gt;
    bar
  &lt;/dd&gt;
  &lt;dt&gt;
    foo
  &lt;/dt&gt;
&lt;/dl&gt;</code></pre>
<p>However, more than one term can be associated with a single description, and more than one description can be associated with a term, in ways which are both valid and meaningful:</p>
<pre><code>&lt;dl class="dictionary"&gt;
  &lt;dt&gt;
    bank
  &lt;/dt&gt;
  &lt;dd&gt;
    1. Somewhere you deposit your money.
  &lt;/dd&gt;
  &lt;dd&gt;
    2. The side of a river.
  &lt;/dd&gt;
  &lt;dt&gt;
    geek
  &lt;/dt&gt;
  &lt;dt&gt;
    nerd
  &lt;/dt&gt;
  &lt;dd&gt;
    Someone who is just misunderstood by the computer
    illiterate imbeciles around them.
  &lt;/dd&gt;
&lt;/dl&gt;</code></pre>
<p>Definition lists are one of the most underused parts of <abbr>XHTML</abbr>, which is a shame as they are a powerful tool. However, their implicit semantics also indicate why <abbr>XHTML</abbr>, whilst being far more semantically expressive than most people give it credit for, is also quite semantically weak.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Phlogiston  &#187; Blog Archive   &#187; Image captions in XHTML</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-189</link>
		<author>Phlogiston  &#187; Blog Archive   &#187; Image captions in XHTML</author>
		<pubDate>Wed, 04 May 2005 19:55:23 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-189</guid>
					<description>[...] d by its description. (Actually, definition lists are a little more complicated than that. See comment 4.) 	So, here&#8217;s how to markup an image [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] d by its description. (Actually, definition lists are a little more complicated than that. See comment 4.) 	So, here&#8217;s how to markup an image [&#8230;]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Sven Lehr</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-314</link>
		<author>Sven Lehr</author>
		<pubDate>Thu, 11 Aug 2005 23:19:33 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-314</guid>
					<description>How about if you wanted to image/caption pairs beside each other?  Say I wanted to use definition lists to make my page look like this: IMG1IMG2CAP1CAP2.</description>
		<content:encoded><![CDATA[<p>How about if you wanted to image/caption pairs beside each other?  Say I wanted to use definition lists to make my page look like this: IMG1IMG2CAP1CAP2.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Sven Lehr</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-315</link>
		<author>Sven Lehr</author>
		<pubDate>Thu, 11 Aug 2005 23:21:30 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-315</guid>
					<description>Sorry that post didn't come out right.  (I used some HTML.)  Here's what I mean:

IMG1	IMG2	IMG3	IMG4
CAP1	CAP2	CAP3	CAP4

Can you style a dl to do that?

Sven</description>
		<content:encoded><![CDATA[<p>Sorry that post didn&#8217;t come out right.  (I used some HTML.)  Here&#8217;s what I mean:</p>
<p>IMG1	IMG2	IMG3	IMG4<br />
CAP1	CAP2	CAP3	CAP4</p>
<p>Can you style a dl to do that?</p>
<p>Sven</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Darren Brierton</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-316</link>
		<author>Darren Brierton</author>
		<pubDate>Fri, 12 Aug 2005 00:41:13 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-316</guid>
					<description>Sven Lehr: Yes that is both a commonly desired layout and a tricky thing to achieve with the technique I described here. Ideally you'd want to wrap each pair of &lt;code&gt;dt&lt;/code&gt; and &lt;code&gt;dd&lt;/code&gt; elements in a container, but you can't because the DTD says only &lt;code&gt;dt&lt;/code&gt; and &lt;code&gt;dd&lt;/code&gt; elements can be children of &lt;code&gt;dl&lt;/code&gt; elements.

What you'd need to do is to place each image and its caption in their own &lt;code&gt;dl&lt;/code&gt; element, and float the &lt;code&gt;dl&lt;/code&gt;s next to each other. So, you'd end up with something like this:

&lt;pre&gt;&lt;code&gt;&#60;dl class="img_col"&#62;
  &#60;dt&#62;
    &#60;img src="IMG1" /&#62;
  &#60;/dt&#62;
  &#60;dd&#62;
    CAP1
  &#60;/dd&#62;
&#60;/dl&#62;
&#60;dl class="img_col"&#62;
  &#60;dt&#62;
    &#60;img src="IMG2" /&#62;
  &#60;/dt&#62;
  &#60;dd&#62;
    CAP2
  &#60;/dd&#62;
&#60;/dl&#62;
&#60;dl class="img_col"&#62;
  &#60;dt&#62;
    &#60;img src="IMG3" /&#62;
  &#60;/dt&#62;
  &#60;dd&#62;
    CAP3
  &#60;/dd&#62;
&#60;/dl&#62;
&#60;dl class="img_col"&#62;
  &#60;dt&#62;
    &#60;img src="IMG4" /&#62;
  &#60;/dt&#62;
  &#60;dd&#62;
    CAP4
  &#60;/dd&#62;
&#60;/dl&#62;&lt;/code&gt;&lt;/pre&gt;

Then you have a style rule that says something like:

&lt;pre&gt;&lt;code&gt;dl.img_col
  {
    float: left;
    margin-right: 0.5ex;
  }&lt;/code&gt;&lt;/pre&gt;

It's not perfect, not at all, but I do think that it preserves more of the semantics than any of the other alternatives.</description>
		<content:encoded><![CDATA[<p>Sven Lehr: Yes that is both a commonly desired layout and a tricky thing to achieve with the technique I described here. Ideally you&#8217;d want to wrap each pair of <code>dt</code> and <code>dd</code> elements in a container, but you can&#8217;t because the DTD says only <code>dt</code> and <code>dd</code> elements can be children of <code>dl</code> elements.</p>
<p>What you&#8217;d need to do is to place each image and its caption in their own <code>dl</code> element, and float the <code>dl</code>s next to each other. So, you&#8217;d end up with something like this:</p>
<pre><code>&lt;dl class="img_col"&gt;
  &lt;dt&gt;
    &lt;img src="IMG1" /&gt;
  &lt;/dt&gt;
  &lt;dd&gt;
    CAP1
  &lt;/dd&gt;
&lt;/dl&gt;
&lt;dl class="img_col"&gt;
  &lt;dt&gt;
    &lt;img src="IMG2" /&gt;
  &lt;/dt&gt;
  &lt;dd&gt;
    CAP2
  &lt;/dd&gt;
&lt;/dl&gt;
&lt;dl class="img_col"&gt;
  &lt;dt&gt;
    &lt;img src="IMG3" /&gt;
  &lt;/dt&gt;
  &lt;dd&gt;
    CAP3
  &lt;/dd&gt;
&lt;/dl&gt;
&lt;dl class="img_col"&gt;
  &lt;dt&gt;
    &lt;img src="IMG4" /&gt;
  &lt;/dt&gt;
  &lt;dd&gt;
    CAP4
  &lt;/dd&gt;
&lt;/dl&gt;</code></pre>
<p>Then you have a style rule that says something like:</p>
<pre><code>dl.img_col
  {
    float: left;
    margin-right: 0.5ex;
  }</code></pre>
<p>It&#8217;s not perfect, not at all, but I do think that it preserves more of the semantics than any of the other alternatives.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Darren Brierton</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-317</link>
		<author>Darren Brierton</author>
		<pubDate>Fri, 12 Aug 2005 01:23:10 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-317</guid>
					<description>BTW, I shoould point out that a server failure ate my theme, so the style rules regarding images and captions are currently unavailable, so you can't really see what I was going on about. The original theme is being resurrected, but I've just been too busy to finish it off.</description>
		<content:encoded><![CDATA[<p>BTW, I shoould point out that a server failure ate my theme, so the style rules regarding images and captions are currently unavailable, so you can&#8217;t really see what I was going on about. The original theme is being resurrected, but I&#8217;ve just been too busy to finish it off.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jordan</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-327</link>
		<author>Jordan</author>
		<pubDate>Fri, 19 Aug 2005 02:59:57 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-327</guid>
					<description>One thing that has always been an issue for me is that I can never get images and captions to look right if they are inserted somewhere in the middle of a paragraph.  A lot of times in a blog, you want the image to appear right in the middle.  Of course, you can't put DIV tags inside of paragraph tags, and yet I want the image to align left or right, but have the caption centered perfectly underneath the image.  Is there a clean way of doing this?  I usually get fed up and stick a table in there. (gasp)</description>
		<content:encoded><![CDATA[<p>One thing that has always been an issue for me is that I can never get images and captions to look right if they are inserted somewhere in the middle of a paragraph.  A lot of times in a blog, you want the image to appear right in the middle.  Of course, you can&#8217;t put DIV tags inside of paragraph tags, and yet I want the image to align left or right, but have the caption centered perfectly underneath the image.  Is there a clean way of doing this?  I usually get fed up and stick a table in there. (gasp)</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Michael Warner II</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-1592</link>
		<author>Michael Warner II</author>
		<pubDate>Wed, 06 Sep 2006 22:51:56 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-1592</guid>
					<description>I was working with DIV tags which did not make semantic sense, untill I found your page which is the only one that I found which gave a semantical solution to image captions. Thanks a lot!
I tried to get the caption to go right of of image  and force the H2 header after to not flow up and into the right of the image . IE6 would not honor the lign breaking after the DL, so I added height: 0 to it which then made IE6 line break after the DL.


  
    
  
  
    CAPTION
  

TOPIC</description>
		<content:encoded><![CDATA[<p>I was working with DIV tags which did not make semantic sense, untill I found your page which is the only one that I found which gave a semantical solution to image captions. Thanks a lot!<br />
I tried to get the caption to go right of of image  and force the H2 header after to not flow up and into the right of the image . IE6 would not honor the lign breaking after the DL, so I added height: 0 to it which then made IE6 line break after the DL.</p>
<p>    CAPTION</p>
<p>TOPIC</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jeff</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-1997</link>
		<author>Jeff</author>
		<pubDate>Wed, 01 Nov 2006 19:07:28 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-1997</guid>
					<description>I'm trying to solve this same problem for a webzine that's designed for maximum accessibility, and I'm very glad I found your blog entry.  This is a very cool solution, though I still wish that the XHTML standards had anticipated the need for captions and built in a solution from the start.

Like Sven, I guess, I'm thinking about more complex visual layouts with photos. A definition list is structurally a kind of cascade, whereas it's our natural expectation (carried over from old media) that photos will be displayed in a way that is more grid-like.

So I wonder if you might also consider using tables for this? Would that be semantically correct? In the simplest form, you might use a single cell per row in a two-row table, with the picture in the top cell and the caption in the bottom one.  CSS would be used to style the table however you like, and maybe the only choice for me would be to turn off borders. 


Figure 1

This is the caption for Figure 1. It can be a long caption, if you like.


Would this also be semantically correct? I know that tables are not meant to be used for layout, but it seems to me that a photo and caption are inherently related "data," just as you infer by relating the caption as a kind of definition ... so the function of the table in this case is relational, with layout being an equal or secondary function.</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to solve this same problem for a webzine that&#8217;s designed for maximum accessibility, and I&#8217;m very glad I found your blog entry.  This is a very cool solution, though I still wish that the XHTML standards had anticipated the need for captions and built in a solution from the start.</p>
<p>Like Sven, I guess, I&#8217;m thinking about more complex visual layouts with photos. A definition list is structurally a kind of cascade, whereas it&#8217;s our natural expectation (carried over from old media) that photos will be displayed in a way that is more grid-like.</p>
<p>So I wonder if you might also consider using tables for this? Would that be semantically correct? In the simplest form, you might use a single cell per row in a two-row table, with the picture in the top cell and the caption in the bottom one.  CSS would be used to style the table however you like, and maybe the only choice for me would be to turn off borders. </p>
<p>Figure 1</p>
<p>This is the caption for Figure 1. It can be a long caption, if you like.</p>
<p>Would this also be semantically correct? I know that tables are not meant to be used for layout, but it seems to me that a photo and caption are inherently related &#8220;data,&#8221; just as you infer by relating the caption as a kind of definition &#8230; so the function of the table in this case is relational, with layout being an equal or secondary function.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jeff</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-1998</link>
		<author>Jeff</author>
		<pubDate>Wed, 01 Nov 2006 19:14:13 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-1998</guid>
					<description>Sorry.  I entered XHTML code on the submission form without coding it as such ... This was my suggestion if you think tables would be an appropriate way to do captions:

&lt;code&gt;

Figure 1

This is the caption for Figure 1. It can be a long caption, if you like.

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Sorry.  I entered XHTML code on the submission form without coding it as such &#8230; This was my suggestion if you think tables would be an appropriate way to do captions:</p>
<p><code></p>
<p>Figure 1</p>
<p>This is the caption for Figure 1. It can be a long caption, if you like.</p>
<p></code></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jeff</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-1999</link>
		<author>Jeff</author>
		<pubDate>Wed, 01 Nov 2006 19:15:54 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-1999</guid>
					<description>Maybe this'll get it:



Figure 1

This is the caption for Figure 1. It can be a long caption, if you like.

</description>
		<content:encoded><![CDATA[<p>Maybe this&#8217;ll get it:</p>
<p>Figure 1</p>
<p>This is the caption for Figure 1. It can be a long caption, if you like.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jeff</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-2000</link>
		<author>Jeff</author>
		<pubDate>Wed, 01 Nov 2006 19:19:14 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-2000</guid>
					<description>... or not!  Imagine the brackets [  ] as guillemets () ...

[table class="image"]
[tr][th]Figure 1[/th][/tr]
[tr][td][img src="figure1.gif" width="100%" /][/td][/tr]
[tr][td]This is the caption for Figure 1. It can be a long caption, if you like.[/td][/tr]
[/table]</description>
		<content:encoded><![CDATA[<p>&#8230; or not!  Imagine the brackets [  ] as guillemets () &#8230;</p>
<p>[table class=&#8221;image&#8221;]<br />
[tr][th]Figure 1[/th][/tr]<br />
[tr][td][img src=&#8221;figure1.gif&#8221; width=&#8221;100%&#8221; /][/td][/tr]<br />
[tr][td]This is the caption for Figure 1. It can be a long caption, if you like.[/td][/tr]<br />
[/table]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Darren Brierton</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-2001</link>
		<author>Darren Brierton</author>
		<pubDate>Wed, 01 Nov 2006 19:48:46 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-2001</guid>
					<description>Hi Jeff!

I don't think a table would be a totally inappropriate way of laying out a series of images and their captions. But I don't think it ideal. For example your &lt;strong&gt;markup&lt;/strong&gt; determines how many columns there are, and therefore how many images (and captions) appear side-by-side, regardless of width of containing block. That isn't very fluid. I still think you would be better off using a seperate dl element for each image and its caption, and then in CSS fixing the height and width of the dls and giving them a float property (right or left, doesn't matter). That way you get a similar effect to the table, but the number of columns expands and contracts to fit the available space.</description>
		<content:encoded><![CDATA[<p>Hi Jeff!</p>
<p>I don&#8217;t think a table would be a totally inappropriate way of laying out a series of images and their captions. But I don&#8217;t think it ideal. For example your <strong>markup</strong> determines how many columns there are, and therefore how many images (and captions) appear side-by-side, regardless of width of containing block. That isn&#8217;t very fluid. I still think you would be better off using a seperate dl element for each image and its caption, and then in CSS fixing the height and width of the dls and giving them a float property (right or left, doesn&#8217;t matter). That way you get a similar effect to the table, but the number of columns expands and contracts to fit the available space.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jeff</title>
		<link>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-2008</link>
		<author>Jeff</author>
		<pubDate>Thu, 02 Nov 2006 15:09:48 +0000</pubDate>
		<guid>http://www.dzr-web.com/people/darren/blog/2005/02/09/image-captions-in-xhtml/#comment-2008</guid>
					<description>Thanks, Darren.  I'm very happy to know that I'm not the only person trying to resolve this in a way that's both accessible and semantically correct!

Struggled much of the day yesterday creating and troubleshooting just such a table (for an intranet, or I'd post the link), and it looked great in Firefox and shattered the layout in IE6.  I was able to resolve most of those problems, but I'm back to give your solution a try instead.</description>
		<content:encoded><![CDATA[<p>Thanks, Darren.  I&#8217;m very happy to know that I&#8217;m not the only person trying to resolve this in a way that&#8217;s both accessible and semantically correct!</p>
<p>Struggled much of the day yesterday creating and troubleshooting just such a table (for an intranet, or I&#8217;d post the link), and it looked great in Firefox and shattered the layout in IE6.  I was able to resolve most of those problems, but I&#8217;m back to give your solution a try instead.</p>
]]></content:encoded>
				</item>
</channel>
</rss>
