I dont know html5 but a definition list should be in html4:
 
<dl>
<dt></dt>
<dd></dd>
</dl>
 
But then again html5 seems to not need opening or closing tags in a lot of
cases, as it accommodates for a more sloppy way of coding and therefore the
validator may be incorrect.
 
Here it doesn't say to use a definition list, just a legend and an img tag
for adding a caption to an image -
http://www.ibm.com/developerworks/library/x-html5/
 
This site however says the html5 spec was changed to use the <dd><dt>
instead but there are still problems with it -
http://html5doctor.com/dd-details-wrong-again/
 
The article says -  In short, details and figure solve a common design
pattern and provide nice new semantic tags to solve that problem. A figure
could be an image you're referring to in an article or chapter of a book,
and the details element allows the user to interactively show and hide the
details of some piece of information.
 
Darren Lovelock
Munky Online Web Design
 <http://www.munkyonline.co.uk/> http://www.munkyonline.co.uk
T: +44 (0)20-8816-8893

  _____  

From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org] On
Behalf Of designer
Sent: 05 January 2010 12:59
To: wsg@webstandardsgroup.org
Subject: [WSG] More on understanding html5


I am getting a bit bogged down with this new stuff!  
 
I used <figure> in this case:
 
 
<figure >
      <img src="graphics/marramgrass.gif" alt="marram grass" width="116"
height="400"/>
      <p style="text-align:center">
                         Marram Grass
      </p>
</figure>
 
and the (experimental) validator said that was fine.  Someone pointed out to
me that this is 'wrong' and that the <p>  should be <dd> and <dt>  :
 
<figure>

 <dd>

  <img src="bubbles-work.jpeg"

       alt="Bubbles, sitting in his office chair, works on his

            latest project intently.">

 </dd>

 <dt>Bubbles at work</dt>

</figure>
So I changed my code to:
<figure>
                    <dd>
                         <img src="graphics/marramgrass.gif" alt="marram
grass" />
                    </dd>
                    <dt> Marram Grass</dt>
               </figure>
and the validator says:
 

1.       Error <http://validator.w3.org/images/info_icons/error.png> Line
78, Column 24: Element dd not allowed as child of element figure in this
context. (Suppressing further errors from this subtree.) 

                            <dd>

        Contexts in which element
<http://www.whatwg.org/specs/web-apps/current-work/#the-dd-element> dd may
be used: 

        After
<http://www.whatwg.org/specs/web-apps/current-work/#the-dt-element> dt or
<http://www.whatwg.org/specs/web-apps/current-work/#the-dd-element> dd
elements inside
<http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element> dl
elements. 

        In a
<http://www.whatwg.org/specs/web-apps/current-work/#the-figure-element>
figure element containing no other
<http://www.whatwg.org/specs/web-apps/current-work/#the-dd-element> dd
element children. 

        As the last child of a
<http://www.whatwg.org/specs/web-apps/current-work/#the-details-element>
details element. 

        Content model for element
<http://www.whatwg.org/specs/web-apps/current-work/#the-figure-element>
figure: 

        In any order, one
<http://www.whatwg.org/specs/web-apps/current-work/#the-dd-element> dd
element, and optionally one
<http://www.whatwg.org/specs/web-apps/current-work/#the-dt-element> dt
element.

2.       Error <http://validator.w3.org/images/info_icons/error.png> Line
81, Column 24: Element dt not allowed as child of element figure in this
context. (Suppressing further errors from this subtree.) 

                            <dt> Marram Grass</dt>

        Contexts in which element
<http://www.whatwg.org/specs/web-apps/current-work/#the-dt-element> dt may
be used: 

        Before
<http://www.whatwg.org/specs/web-apps/current-work/#the-dd-element> dd or
<http://www.whatwg.org/specs/web-apps/current-work/#the-dt-element> dt
elements inside
<http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element> dl
elements. 

        In a
<http://www.whatwg.org/specs/web-apps/current-work/#the-figure-element>
figure element containing no other
<http://www.whatwg.org/specs/web-apps/current-work/#the-dt-element> dt
element children. 

        As the first child of a
<http://www.whatwg.org/specs/web-apps/current-work/#the-details-element>
details element. 

        Content model for element
<http://www.whatwg.org/specs/web-apps/current-work/#the-figure-element>
figure: 

        In any order, one
<http://www.whatwg.org/specs/web-apps/current-work/#the-dd-element> dd
element, and optionally one
<http://www.whatwg.org/specs/web-apps/current-work/#the-dt-element> dt
element.

So, is the validator wrong? And, if so, where do I get guidance as I bumble
along?
Duh?
 
Bob
 



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
******************************************************************* 


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

<<error.png>>

Reply via email to