[whatwg] adding microdata to basic links

Edward O'Connor eoconnor at apple.com
Wed Aug 24 13:26:39 PDT 2011


I wrote:

> This could be represented in Microdata without an extra element:
> 
> <p itemscope>
> This book has been authored by
>    <span itemprop="name">
>        <a itemprop="url" href="http://smith.org/john">John
> Smith</a>
>    </span>
> </p>
> 
> Not the same. The span element in my example was used to assert a type

Ahh, sorry, I dropped the type. But I did so by moving the itemscope to the p from the span. You can dangle the type off of <p> and avoid the extra element like so:

<p itemscope itemtype="http://schema.org/Person">
    This book has been authored by
        <span itemprop="name">
            <a itemprop="url" href="http://smith.org/john">John
Smith</a>
        </span>
</p>





More information about the whatwg mailing list