[html5] microdata and the dl element
Benjamin Hawkes-Lewis
bhawkeslewis at googlemail.com
Sun May 20 01:01:20 PDT 2012
On Sun, May 20, 2012 at 5:35 AM, Brian Tremblay <webmaster at tsmchughs.com> wrote:
> I've marked up a restaurant menu using the <dl> element, with a <dt> for
> each item, followed by 2 or more <dd> elements, one for price, description,
> and, where appropriate, additional options.
>
> I want to add microdata product markup (http://schema.org/Product) but can't
> find a way to do it. It seems like I need a wrapper for each menu item
No. You can use @itemref:
http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#attr-itemref
For example:
<dl>
<dt id=artichokes
itemscope
itemtype=http://schema.org/Product
itemref="artichokes-offers artichokes-description">
<span itemprop=name>Artichoke Hearts Au Gratin</span>
</dt>
<dd id=artichokes-offers
itemprop=offers
itemscope
itemtype=http://schema.org/Offer>
<span itemprop=price>$6.50</span>
</dd>
<dd id=artichokes-description itemprop=description>
Diced artichoke hearts baked in a cheddar-parmesan sauce.
Served with our Irish soda bread and molasses wheat bread.
</dd>
<dt id=shrimp-cocktail
itemscope
itemtype=http://schema.org/Product
itemref="shrimp-cocktail-offers shrimp-cocktail-description">
<span itemprop=name>Peel & Eat Shrimp</span>
</dt>
<dd id=shrimp-cocktail-offers
itemprop=offers
itemscope
itemtype=http://schema.org/Offer>
<span itemprop=price>$7.50</span>
</dd>
<dd id=shrimp-cocktail-description itemprop=description>
A half pound of chilled shrimp with our cocktail sauce.
</dd>
</dl>
> which I sort of think should be there anyways.
This has been discussed many times before, mostly recently at:
http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=%3Cdi%3E+please&hdr-2-name=from&hdr-2-query=&hdr-3-name=message-id&hdr-3-query=&period_month=&period_year=&index-grp=Public__FULL&index-type=t&type-index=public-whatwg-archive&resultsperpage=100&sortby=date-asc
The editor's take was that features should be added to CSS to support
styling definition names and values as groups.
--
Benjamin Hawkes-Lewis
More information about the Help
mailing list