On 17/08/2009 06:18, Tim MacKay wrote:
I am marking up product nutritional information and am thinking of doing
it like so:

<dl>

<dt> The Product </dt>

<dd> Paragraph blurb about the product </dd>

<dd>

<table>

<…etc>Tabular data of the nutritional information</…etc>

</table>

</dd>

</dl>

Is nesting the table within the def list valid markup?

Yes.

I'd tend to suggest using headings (or headings inside a list) instead of a definition list, so that each product has an entry in the effective document outline:

<h2>The Product</h2>
<p>blurb</p>
<table>
<caption>Nutritional information</caption>
...
</table>

More practically, this allows non-mouse users of Opera (http://www.opera.com/browser/tutorials/nomouse/) or assistive technology (http://www.freedomscientific.com/Training/Surfs-up/Navigating.htm) to skip effectively from one product to another, and surfaces the products in assistive technology heading lists.

Some assistive technology does have some support for definition lists, but it's not especially pretty, which isn't surprising given the HTML spec suggests using the element for "terms" and "descriptions", and also for dialogs:

http://www.webaim.org/discussion/mail_message.php?id=11226

--
Benjamin Hawkes-Lewis


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

Reply via email to