SyntaxStudy
Sign Up
HTML Microdata and Schema.org
HTML Intermediate 4 min read

Microdata and Schema.org

Structured Data

Microdata and JSON-LD (with Schema.org vocabulary) help search engines understand page content, enabling rich snippets in search results.

Example
<!-- JSON-LD (Google prefers this) -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "HTML5 Features Guide",
  "author": { "@type": "Person", "name": "Alice" },
  "datePublished": "2024-01-15",
  "image": "https://example.com/img/html5.jpg"
}
</script>

<!-- Or inline Microdata -->
<article itemscope itemtype="https://schema.org/Article">
  <h1 itemprop="headline">HTML5 Features</h1>
  <span itemprop="author">Alice</span>
</article>
Pro Tip

Use Google's Rich Results Test tool to verify your structured data is correct.