From 280785401785239f059061eed79f073662bcc49e Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Mon, 24 Oct 2016 13:48:03 +0200 Subject: [PATCH] Add an example of dl+div with microdata --- source | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/source b/source index 3d5eeb3b002..a9d2fe975b6 100644 --- a/source +++ b/source @@ -17982,6 +17982,64 @@ first matching case):</p> </dl> +
+ +

This example uses microdata attributes in a dl element, together + with the div element, to annotate the ice cream desserts at a French restaurant.

+ + +
<dl>
+ <div itemscope itemtype="http://schema.org/Product">
+  <dt itemprop="name">Café ou Chocolat Liégeois</dt>
+  <dd itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+   <span itemprop="price">3.50 €</span>
+  </dd>
+  <dd itemprop="description">
+   2 boules Café ou Chocolat, 1 boule Vanille, sause café ou chocolat, chantilly
+  </dd>
+ </div>
+
+ <div itemscope itemtype="http://schema.org/Product">
+  <dt itemprop="name">Américaine</dt>
+  <dd itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+   <span itemprop="price">3.50 €</span>
+  </dd>
+  <dd itemprop="description">
+   1 boule Crème brûlée, 1 boule Vanille, 1 boule Caramel, chantilly
+  </dd>
+ </div>
+</dl>
+ +

Without the div element the markup would need to use the itemref attribute to link the data in the dd elements + with the item, as follows.

+ +
<dl>
+  <dt itemscope itemtype="http://schema.org/Product" itemref="1-offer 1-description">
+   <span itemprop="name">Café ou Chocolat Liégeois</span>
+  </dt>
+  <dd id="1-offer" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+   <span itemprop="price">3.50 €</span>
+  </dd>
+  <dd id="1-description" itemprop="description">
+   2 boules Café ou Chocolat, 1 boule Vanille, sause café ou chocolat, chantilly
+  </dd>
+
+ <div>
+  <dt itemscope itemtype="http://schema.org/Product" itemref="2-offer 2-description">
+   <span itemprop="name">Américaine</span>
+  </dt>
+  <dd id="2-offer" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+   <span itemprop="price">3.50 €</span>
+  </dd>
+  <dd id="2-description" itemprop="description">
+   1 boule Crème brûlée, 1 boule Vanille, 1 boule Caramel, chantilly
+  </dd>
+ </div>
+</dl>
+ +
+

The dl element is inappropriate for marking up dialogue. Examples of how to mark up dialogue are shown below.