Ho preso spunto da un articolo di Fulciniti presente proprio in html.it:
"Esperimenti con le liste di definizione" per creare una galleria di immagini.
Il codice proposto da Fulciniti è:
codice:
<div id="gallery">
<dl>
<dt>[img]sea.jpg[/img]</dt>
<dd>Didascalia prima immagine.</dd>
</dl>
<dl>
<dt>[img]sea2.jpg[/img]</dt>
<dd>Qui il titolo o una breve descrizione.</dd>
</dl>
</div>
Però, la mia galleria consiste in una serie di miniature che rinviano
alle immagini a dimensioni reali. Avevo scritto una cosa del genere:
codice:
<div id="gallery">
<dl>
<a class="opacity" href="pics/australia/foto04.jpg">
<dt>[img]pics/australia/foto04_small.jpg[/img]</a></dt>
<dd>I ragazzi australiani in visita a Venezia</dd>
</dl>
<dl>
<dt>[img]pics/australia/foto05_small.jpg[/img]</dt>
<dd>Il benvenuto agli australiani al Parco Gazzera</dd>
</dl>.............
ma non passa la validazione. Infatti ricevo il messaggio di errore:
# Line 68, Column 51: document type does not allow element "a" here; missing one of "dt", "dd" start-tag.

…ity" href="pics/australia/foto04.jpg"><dt><img src="pics/australia/foto04_sma
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "

" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
# Error Line 68, Column 55: document type does not allow element "dt" here.

… href="pics/australia/foto04.jpg"><dt><img src="pics/australia/foto04_small.j
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
Come posso salvare capra e cavoli?

Grazie
M.