schemaorg-coda :: Example

eg-0457

From v29.4

JSON-LD

{
    "@context": "https://schema.org",
    "@type": "WebSite",
    "url": "http://example.com/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": "http://example.com/search?&q={query}",
      "query": "required"
    }
}

RDFa

<div vocab="https://schema.org/" typeof="WebSite">
    <link property="url" href="http://www.example.com/"/>
    <form property="potentialAction" typeof="https://schema.org/SearchAction">
      <meta property="target" content="http://www.example.com/search?q={query}"/>
      <input property="query" type="text" name="query">
      <input type="submit">
    </form>
</div>

Microdata

<div itemscope itemtype="https://schema.org/WebSite">
    <link itemprop="url" href="http://www.example.com/"/>
    <form itemprop="potentialAction" itemscope itemtype="https://schema.org/SearchAction">
	  <meta itemprop="target" content="http://example.com/search?q={query}"/>
      <input itemprop="query" type="text" name="query"/>
      <input type="submit"/>
    </form>
</div>

Pre-Markup

<p>(A WebSite describing its search options)</p>