2

I'm trying to mark up article sections (articleSection) on my blog listing page. Each article section also has a link to go to that section.

Which of these syntaxes, if any, is correct as they produce different results in the Google Structured Data Testing Tool:

<a href="#"><span itemprop='articleSection'>section name 1</span></a>

Testing Tool result: articleSection: section name 1

<span itemprop='articleSection'><a href="#">section name 2</a></span>

Testing Tool result: articleSection: section name 2

<a href="#" itemprop='articleSection'>section name 3</a>

Testing Tool result: articleSection: http://www.example.com/pagelocation/#

Perhaps this matters, perhaps it doesn't.

Does having a link inside the articleSection property help? articleSection looks for 'text' not URL.

GoldStarBonus: Is there any way/advantage to associate a link to the articleSection name? If not, that's fine for now.

unor
  • 92,415
  • 26
  • 211
  • 360
Mark Stickling
  • 394
  • 3
  • 17

1 Answers1

1

The articleSection property expects Text as value.

In Microdata, you can give a text value by not using an element that would specify an URL (like a, area, link, video etc.) or a datetime (time).

So don’t use a. span is fine, unless there is a more appropriate element defined in HTML5.

As far as Microdata and Schema.org are concerned, there is no difference between these:

  • <a href="#"><span itemprop="articleSection">…</span></a>
  • <span itemprop="articleSection"><a href="#">…</a></span>

As Schema.org does not define a type for an article section (e.g., ArticleSection), you can’t specify any additional data about such a section.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360