schemaorg-coda :: Example

eg-0023

From v29.4

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "Article",
  "author": "John Doe",
  "interactionStatistic": [
    {
      "@type": "InteractionCounter",
      "interactionService": {
        "@type": "WebSite",
        "name": "Twitter",
        "url": "http://www.twitter.com"
      },
      "interactionType": "https://schema.org/ShareAction",
      "userInteractionCount": "1203"
    },
    {
      "@type": "InteractionCounter",
      "interactionType": "https://schema.org/CommentAction",
      "userInteractionCount": "78"
    }
  ],
  "name": "How to Tie a Reef Knot"
}

RDFa

<div vocab="https://schema.org/" typeof="Article">
  <span property="name">How to Tie a Reef Knot</span>
  by <span property="author">John Doe</span>
  This article has been tweeted 1203 times and contains 78 user comments.
  <div property="interactionStatistic" typeof="InteractionCounter">
    <div property="interactionService" typeof="WebSite">
      <meta property="url" content="http://www.twitter.com"/>
      <meta property="name" content="Twitter" />
    </div>
    <meta property="interactionType" content="https://schema.org/ShareAction"/>
    <meta property="userInteractionCount" content="1203" />
  </div>
  <div property="interactionStatistic" typeof="InteractionCounter">
    <meta property="interactionType" content="https://schema.org/CommentAction"/>
    <meta property="userInteractionCount" content="78" />
  </div>
</div>

Microdata

<div itemscope itemtype="https://schema.org/Article">
  <span itemprop="name">How to Tie a Reef Knot</span>
  by <span itemprop="author">John Doe</span>
  This article has been tweeted 1203 times and contains 78 user comments.
  <div itemprop="interactionStatistic" itemscope itemtype="https://schema.org/InteractionCounter">
    <div itemprop="interactionService" itemscope itemid="http://www.twitter.com" itemtype="https://schema.org/WebSite">
      <meta itemprop="name" content="Twitter" />
    </div>
    <meta itemprop="interactionType" content="https://schema.org/ShareAction"/>
    <meta itemprop="userInteractionCount" content="1203" />
  </div>
  <div itemprop="interactionStatistic" itemscope itemtype="https://schema.org/InteractionCounter">
    <meta itemprop="interactionType" content="https://schema.org/CommentAction"/>
    <meta itemprop="userInteractionCount" content="78" />
  </div>
</div>

Pre-Markup

How to Tie a Reef Knot
by John Doe
This article has been tweeted 1203 times and contains 78 user comments.