I'm currently working on a news page for a website. Since I don't find any news example on http://schema.org/, I was wondering what's the best Schema.org type for this?
<li>
<time>2015-12-31<time>
<div>
<h2>News title</h2>
<div class="content">Lorem Ipsum</div>
</div>
</li>
Should I even bother adding Microdata?
What I currently have:
<li itemscope itemtype="http://schema.org/Article">
<time itemprop="datePublished">2015-12-31<time>
<div>
<h2 itemprop="headline">News title</h2>
<div class="content" itemprop="description">Lorem Ipsum</div>
</div>
</li>
Is Article
appropriate?
Should I use headline
or name
?
Should I use description
or articleBody
?
The Schema.org type Article
is appropriate, as its description says (bold emphasis mine):
An article, such as a news article or piece of investigative report. […]
But you can even be more specific by using the NewsArticle
type (note that by using this type, your news post is also an Article
and also an CreativeWork
and also a Thing
, so you don’t "miss" anything).
Regarding description
vs. articleBody
: Just like their descriptions say, you would use description
for a "short description" and articleBody
for the "actual body" of the news article.
Regarding name
vs. headline
: they would often have the same content, so if you don’t know/need this difference, you could either use both (itemprop="headline name"
) or simply go with name
(as this is what every item/Thing
can have, while headline
is an addition for CreativeWork
only).
It has nothing to do with the Microdata, but you might want to use the article
element for each news post in this list. If it’s a list, for example, of recent news posts, the parent should probably not be article
but section
:
<section>
<h1>Recent news posts</h1>
<ul>
<li><article><!-- news post 1 --></article></li>
<li><article><!-- news post 2 --></article></li>
</ul>
</section>
And an article
could look like:
<li>
<article itemscope itemtype="http://schema.org/NewsArticle">
<header>
<time itemprop="datePublished">2015-12-31<time>
<h2 itemprop="name">News title</h2>
</header>
<div itemprop="description"><!-- news teaser --></div>
<!-- or "articleBody" instead of "description" if it’s the full content -->
</article>
</li>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With