Schema markup is structured data that can be added to your website’s HTML code to provide search engines with more information about your content. This helps search engines better understand your content and can lead to richer search results for your website.
Here are some examples of schema markup implementation:
- Local Business Markup:
This markup is used for businesses with a physical presence, such as restaurants or shops. Here’s an example of the code for a local business:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "LocalBusiness",
"name": "Example Restaurant",
"url": "https://www.example.com/",
"logo": "https://www.example.com/logo.png",
"description": "Example Restaurant is a fine dining restaurant in downtown Anytown.",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main St",
"addressLocality": "Anytown",
"addressRegion": "CA",
"postalCode": "12345",
"addressCountry": "US"
},
"telephone": "(123) 456-7890",
"priceRange": "$$$$",
"openingHours": [
"Mo-Su 17:00-22:00"
],
"menu": "https://www.example.com/menu"
}
</script>
- Article Markup:
This markup is used for articles and blog posts. Here’s an example of the code for an article:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"headline": "Example Article Headline",
"image": "https://www.example.com/article-image.png",
"author": {
"@type": "Person",
"name": "John Doe"
},
"publisher": {
"@type": "Organization",
"name": "Example News",
"logo": {
"@type": "ImageObject",
"url": "https://www.example.com/logo.png"
}
},
"datePublished": "2022-01-01T00:00:00+00:00",
"dateModified": "2022-01-01T00:00:00+00:00",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://www.example.com/article-url"
},
"articleSection": "Example Article Section",
"description": "Example Article Description"
}
</script>
- Product Markup:
This markup is used for products. Here’s an example of the code for a product:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"name": "Example Product",
"image": "https://www.example.com/product-image.png",
"description": "Example Product Description",
"brand": {
"@type": "Brand",
"name": "Example Brand"
},
"offers": {
"@type": "Offer",
"priceCurrency": "USD",
"price": "99.99",
"availability": "http://schema.org/InStock"
}
}
</script>
These are just a few examples of the many types of schema markup that can be implemented on a website. By adding schema markup, you can provide search engines with more information about your content and improve the visibility of your website in search results.