[whatwg] adding microdata to basic links

Edward O'Connor eoconnor at apple.com
Wed Aug 24 12:53:43 PDT 2011


Tantek asked:

>> Could you provide a complete RDFa example of what you're attempting to
>> accomplish?

Stéphane replied:

> <p>
> This book has been authored by
>    <span vocab="http://schema.org/" typeof="Person">
>        <a property="name" rel="url" href="http://smith.org/john">John
> Smith</a>
>    </span>
> </p>

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>

Or in the hCard microformat with even less markup:

<p class="vcard">
    This book has been authored by <a class="fn url"
    href="http://smith.org/john">John Smith</a>
</p>



HTH,
Ted


More information about the whatwg mailing list