Schema markup, also known as structured data, is a form of microdata that you can add to your HTML to improve how search engines read and represent your page in search engine results pages (SERPs). This markup provides additional context about the content on your page, helping search engines understand it better and often leading to enhanced search results known as rich snippets.
What is Schema Markup?
Schema markup is a standardized vocabulary of tags (or microdata) that you can add to your HTML to provide search engines with detailed information about your page content. This vocabulary is developed and maintained by Schema.org, a collaborative community with support from major search engines like Google, Bing, Yahoo, and Yandex.
Benefits of Schema Markup
Types of Schema Markup
There are many types of schema markup for different content types. Here are some common examples:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Example Article Title",
"author": {
"@type": "Person",
"name": "John Doe"
},
"datePublished": "2024-07-30",
"publisher": {
"@type": "Organization",
"name": "Example Publisher"
}
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example Product",
"image": "https://example.com/image.jpg",
"description": "This is an example product.",
"sku": "12345",
"brand": {
"@type": "Brand",
"name": "Example Brand"
},
"offers": {
"@type": "Offer",
"url": "https://example.com/product",
"priceCurrency": "USD",
"price": "29.99",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock"
}
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Event",
"name": "Example Event",
"startDate": "2024-08-10T19:30",
"location": {
"@type": "Place",
"name": "Example Venue",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Example Street",
"addressLocality": "Example City",
"postalCode": "12345",
"addressCountry": "US"
}
},
"offers": {
"@type": "Offer",
"url": "https://example.com/tickets",
"price": "49.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Recipe",
"name": "Example Recipe",
"author": {
"@type": "Person",
"name": "Jane Doe"
},
"datePublished": "2024-07-30",
"description": "This is an example recipe.",
"recipeIngredient": [
"1 cup of flour",
"2 eggs",
"1/2 cup of sugar"
],
"recipeInstructions": [
{
"@type": "HowToStep",
"text": "Mix ingredients together."
},
{
"@type": "HowToStep",
"text": "Bake at 350 degrees for 20 minutes."
}
],
"nutrition": {
"@type": "NutritionInformation",
"calories": "200 calories"
}
}
</script>
Implementing Schema Markup
<div itemscope itemtype="https://schema.org/Product">
<span itemprop="name">Example Product</span>
<img itemprop="image" src="https://example.com/image.jpg" alt="Example Product">
<span itemprop="description">This is an example product.</span>
<span itemprop="sku">12345</span>
<span itemprop="brand" itemscope itemtype="https://schema.org/Brand">
<span itemprop="name">Example Brand</span>
</span>
<span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<link itemprop="url" href="https://example.com/product">
<meta itemprop="priceCurrency" content="USD">
<span itemprop="price">29.99</span>
<link itemprop="itemCondition" href="https://schema.org/NewCondition">
<link itemprop="availability" href="https://schema.org/InStock">
</span>
</div>
Testing and Validation
By using schema markup, you can provide more detailed and structured information to search engines, potentially enhancing your site's visibility and click-through rates in search results.
;