-1

I implemented the following SEO markup on news article pages (around article text): <div class="articleBody" itemscope="" itemtype="https://schema.org/NewsArticle">

Is this implementation enough? Is this good for SEO?

On other sites I see <html lang="it" itemscope itemtype="http://schema.org/NewsArticle"> or <script type="application/ld+json"> with "@context": "https://schema.org", "@type": "NewsArticle"

So I am not sure if my implementation is correct or needs to be changed.

2
2

I should note at the outset of this answer that individual preferences may vary and there may be others here who would like to advocate very strongly for Microdata.

But my direct experience (having worked with both JSON-LD and Microdata and RDFa) is that - in the interests of future maintainability, not least - if you are currently making an early decision as to use either Microdata (or RDFa) or JSON-LD, I would definitely lean towards JSON-LD.

In future, you (or other maintainers) will want to make changes to your Semantic Data at some point.

Consequently, keeping your Semantic Data separated from - rather than interwoven with - your Markup is a sensible choice. (No less sensible than keeping your CSS and your JS separated from your HTML).

Additionally, it's (arguably) much more straightforward to update JSON computationally than it is HTML + Microdata. And computational updates can often be faster, more efficient and more accurate than handwritten updates.

If you do decide to go with JSON-LD rather than Microdata, the example of NewsArticle at schema.org is a textbook example:

<script type="application/ld+json">
    {
       "@context": "https://schema.org",
       "@type": "NewsArticle",
       "url": "http://www.bbc.com/news/world-us-canada-39324587",
       "publisher":{
          "@type":"Organization",
          "name":"BBC News",
          "logo":"http://www.bbc.co.uk/news/special/2015/newsspec_10857/bbc_news_logo.png?cb=1"
       },
       "headline": "Trump Russia claims: FBI's Comey confirms investigation of election 'interference'",
       "mainEntityOfPage": "http://www.bbc.com/news/world-us-canada-39324587",
       "articleBody": "Director Comey says the probe into last year's US election would assess if crimes were committed.",
       "image":[
          "http://ichef-1.bbci.co.uk/news/560/media/images/75306000/jpg/_75306515_line976.jpg",
          "http://ichef.bbci.co.uk/news/560/cpsprodpb/8AB9/production/_95231553_comey2.jpg",
          "http://ichef.bbci.co.uk/news/560/cpsprodpb/17519/production/_95231559_committee.jpg",
          "http://ichef.bbci.co.uk/news/560/cpsprodpb/CC81/production/_95235325_f704a6dc-c017-4971-aac3-04c03eb097fb.jpg",
          "http://ichef-1.bbci.co.uk/news/560/cpsprodpb/11AA1/production/_95235327_c0b59f9e-316e-4641-aa7e-3fec6daea62b.jpg",
          "http://ichef.bbci.co.uk/news/560/cpsprodpb/0F99/production/_95239930_trumptweet.png",
          "http://ichef-1.bbci.co.uk/news/560/cpsprodpb/10DFA/production/_95241196_mediaitem95241195.jpg",
          "http://ichef.bbci.co.uk/news/560/cpsprodpb/2CA0/production/_95242411_comey.jpg",
          "http://ichef.bbci.co.uk/news/560/cpsprodpb/11318/production/_95242407_mediaitem95242406.jpg",
          "http://ichef-1.bbci.co.uk/news/560/cpsprodpb/BCED/production/_92856384_line976.jpg",
          "http://ichef-1.bbci.co.uk/news/560/cpsprodpb/12B64/production/_95244667_mediaitem95244666.jpg"
       ],
       "datePublished":"2017-03-20T20:30:54+00:00"
    }
</script>

Source: https://schema.org/NewsArticle

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.