W3C home > Mailing lists > Public > public-vocabs@w3.org > January 2012

Re: Does order of itemscope and itemprop matter?

From: Özer Kavak <ozerkavak@gmail.com>
Date: Tue, 10 Jan 2012 14:52:23 +0200
Message-ID: <CANJoW01h9=P9YB2hA253SZeXm5QfuYF6mKKFF=126LW4miQ+cA@mail.gmail.com>
To: public-vocabs@w3.org

I've remembered an issue for rich snippet testing tool.
I was confused on those days about wrong(!) placement of itemscope.

I've tried again:

When itemscope is at the end:
<div id="rat" itemtype="http://schema.org/Product" itemscope>
 <div itemtype="http://data-vocabulary.org/Review-aggregate" itemscope>
Rich snippet testing tool parse and and generate snippet properly.
Attached screenshot: s1.png (http://www.freeimagehosting.net/4ngob)

when the code is:
<div id="rat" itemscope itemtype="http://schema.org/Product">
 <div itemscope itemtype="http://data-vocabulary.org/Review-aggregate">
Rich snippet testing tool parses and generates snippet properly.
Attached sceenshot: s2.png (http://www.freeimagehosting.net/gtbod)

Ozer Kavak

(from local playground results)

Original message
On 5 January 2012 12:43, Mehershad Dahmubed <mehershad@gmail.com

> Forgive me if this question sounds silly but there is a reason why I have to ask this.

It's a perfectly fine question to ask!

> I understand the syntax that is advertise is:
> <div itemscope itemprop="<value>">
> Due to the HamlPy library in current use on my system, even after my own fixes added, the library outputs:
> <div itemprop="<value>" itemscope>
> due to the way ast.literal_eval evaluates the dictionary key/value pairs. I don't why it swaps the order but that's where it stands.
> So I was curious if the order really mattered or where I stand right now is fine too?

It shouldn't matter. As I type this I see Jeni also replied :)

In general, if people have 'simple' questions like this, don't feel
bad about asking them since others are likely thinking the same thing.
It also helps standards folk understand how to improve the


(image/png attachment: s1.png)

(image/png attachment: s2.png)

Received on Tuesday, 10 January 2012 17:04:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:48:44 UTC