Article schema is a type of schema markup that helps search engines better understand information about an article on a webpage. By using article schema, you can provide structured data that define key attributes of an article, such as the article title, author, date published, and article body.
Here’s an example of an article schema for a fictional news article:
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://example.com/article"
},
"headline": "New Study Finds Drinking Coffee Can Extend Lifespan",
"image": {
"@type": "ImageObject",
"url": "https://example.com/photos/coffee.jpg",
"height": 800,
"width": 800
},
"datePublished": "2022-03-15T08:00:00+08:00",
"dateModified": "2022-03-15T10:00:00+08:00",
"author": {
"@type": "Person",
"name": "John Doe"
},
"publisher": {
"@type": "Organization",
"name": "Example News",
"logo": {
"@type": "ImageObject",
"url": "https://example.com/logo.jpg",
"width": 600,
"height": 60
}
},
"description": "A new study has found that drinking coffee can extend lifespan by up to 10 years.",
"articleBody": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vitae mauris ac justo finibus vulputate vel eget arcu. Etiam nec turpis condimentum, mollis nisl eget, aliquam nunc. Cras euismod velit ante, a imperdiet mauris placerat eget. Nulla facilisi. Nullam eleifend lobortis mi, et luctus elit commodo eget. Vivamus eget dui sit amet risus pretium pellentesque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec facilisis odio ut velit ultricies rhoncus. Sed eget ultrices tortor. Donec accumsan mauris non leo eleifend, id convallis lectus bibendum. Nulla quis nulla ut enim tincidunt convallis. Sed efficitur metus eu turpis tristique, ut sollicitudin dolor sodales. Suspendisse potenti. In maximus nibh ut eleifend molestie."
}
</script>
In this example, we have defined an article schema for a news article with the headline “New Study Finds Drinking Coffee Can Extend Lifespan”. We have included information about the article’s main entity URL, image, date published, date modified, author, publisher, description, and article body.
Here is a breakdown of each element in the example code:
@context
: This specifies the context in which the markup is being used. In this case, it is set to “https://schema.org/“, which is the recommended context for schema markup.@type
: This specifies the type of schema being used. In this case, it is set to “NewsArticle”, indicating that this is an article schema for a news article.mainEntityOfPage
: This is a reference to the main entity of the page, which in this case is a WebPage schema.headline
: This is the headline of the article.image
: This is an ImageObject schema that provides information about the article’s featured image, including its URL, height, and width.datePublished
: This is the date on which the article was first published, in ISO 8601 format.dateModified
: This is the date on which the article was last modified, in ISO 8601 format.author
: This is a Person schema that provides information about the author of the article, including their name.publisher
: This is an Organization schema that provides information about the publisher of the article, including their name and logo.description
: This is a short description of the article.articleBody
: This is the main body of the article, which contains the full text of the article.