Skip to content

Instantly share code, notes, and snippets.

@dbridgman
Last active August 29, 2015 14:26
Show Gist options
  • Save dbridgman/4bb0226543ba6fda2010 to your computer and use it in GitHub Desktop.
Save dbridgman/4bb0226543ba6fda2010 to your computer and use it in GitHub Desktop.
<div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">
<iframe class="video2" width="755" height="425" src="https://www.youtube.com/embed/uNDZTcmPfnU?showinfo=0"></iframe>
<meta itemprop="name" content="Welcome To Floor Factory">
<meta itemprop="thumbnailUrl" content="http://www.floor-factory.co.uk/wp-content/themes/floor_fact/images/thumbnail.png">
<meta itemprop="description" content="A short video displaying the Floor Factory Derby branch, with a rundown of facilities and range of products provided.">
<meta itemprop="uploadDate" content="2014-05-09">
<meta itemprop="duration" content="T0M44S">
</div>
There are lots of properties you can add to the video, however there are three in particular that are mandatory: name, thumbnailUrl, and description.
Further things to note:
- The upload date has to be in ISO 8601 format, e.g. : Year-Month-Day
- The duration is self explanatory in that the ’T’ refers to time, the ‘M’ refers to minutes, and the ’S’ refers to seconds, and the numbers are the duration. So in this case the video marked up was only 44seconds long.
- You can use either a meta tag like I have to hide the information so it doesn’t show on the page, alternatively you can add the itemprops to span tags if you want the video name and description to show.
- Further tags can be found in the usual place: http://www.schema.org/VideoObject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment