Question

I was looking at YouTube's HTML source code for video pages and saw these tags:

<div id="watch7-container" itemscope itemtype="http://schema.org/VideoObject">
  <link itemprop="url" href="http://www.youtube.com/watch?v=ikbEBp5BeCM">
  <meta itemprop="name" content="THE TEST">
  <meta itemprop="duration" content="PT1M10S">
  <meta itemprop="unlisted" content="False">
  <link itemprop="embedURL" href="http://www.youtube.com/v/ikbEBp5BeCM?autohide=1&amp;version=3">
  <meta itemprop="playerType" content="Flash">
  <meta itemprop="width" content="640">
  <meta itemprop="height" content="480">

Every time the value is a URL, YouTube uses the link tag instead of the meta tag.

http://validator.w3.org/ validated both <meta content="http://..." itemprop="url"> and <link href="http://..." itemprop="url"> as being valid HTML.

What is the benefit of doing this?

Was it helpful?

Solution

On the page for the type http://schema.org/VideoObject you can find the "Expected Type" for each property.

For url and embedURL it says: "URL".

If you want to provide a URL in HTML5, you have to use the href attribute (on link, a, …), the src attribute (img, …), or any other ways that are defined.

If you use a URL as value of the content attribute of a meta element, it will represent a string (looking like a URL), not a URL.

You can find the relevant part in the Microdata spec, 5.4 Values.

OTHER TIPS

They might think that link elements will be processed in normal indexing robot operations (even when not trying to interpret microdata as per Schema.org), since they generally follow links. Another possible reason is that link checkers can be used to verify URLs when they appear as href attribute values or otherwise in attributes that specifically take URL values.

Note, however, that the sample code on the Google instructions page Schema.org for Videos uses meta for embedURL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top