Contacting degal

degal, 38 Munro Crescent
Southampton
Hampshire
United Kingdom
SO15 4PB

Telephone: 02380 481732
Monday-Friday: 9.00am – 6pm

Schema.org HTML 5 – The literal did not satisfy the time-datetime format.

Home/SEO/Schema.org HTML 5 – The literal did not satisfy the time-datetime format.

Schema.org HTML 5 – The literal did not satisfy the time-datetime format.

W3C’s HTML validator throwing up an HTML error with Schema.org markup?

As part of our SEO work, it has been important for businesses to include Schema.org -Structured data markup to help search engines understand their content and serve their site as a high ranking and relevant search for business related search terms and keywords.

It is also fairly important to ensure your site validates and conforms to HTML standards – although it is always important to code for the human first, and an HTML error warning isn’t necessarily a bad thing, if you understand the error and the reason for coding that way outweighs the benefit of a 100% validating website.

For a number of years now Schema have suggested a certain format for business opening hours – now the structured data around opening times is pretty crucial and a very important thing for a business to accurately convey.

For the past year or so there has been a conflict with HTML 5 validation and the previous recommended method by Schema.

The literal did not satisfy the time-datetime format - HTML bad value validation error with Schema.org time and datetime mark-up

The literal did not satisfy the time-datetime format – HTML bad value validation error with Schema.org time and datetime mark-up

The literal did not satisfy the time-datetime format – Error

Now the old Schema recommendation for a store open 9-5, 5 days a week was:

<time itemprop="openingHours" datetime="Mo-Fr 09:00-19:00">Monday-Friday: 9:00 am to 7:00 pm</time>

This would throw up an error when using the HTML validator.  For the previous year we have ignored this error in favour of the bonus of correct structured data mark-up. Well the good news this year Schema have updated their recomendations for correctly displaying this information, and by following the below edit you will once again have validating HTML and accurate structured data!

The solution to solve the time-datetime format error

Replace “time” with “span” and “datetime” with “content” – below shows how you should now structure the same opening hours to comply with the new Schema and once again have validating HTML.

<span itemprop="openingHours" content="Mo-Fr 09:00-19:00">Monday-Friday: 9:00 am to 7:00 pm</span>

This can also be read in full here with the Schema.org opening hours information page.

By | 2016-11-07T15:51:02+00:00 September 1st, 2016|SEO|0 Comments

About the Author:

Steven Galton is the founder and owner of degal. It is his passion and drive that forge the vision for degal and ensures that we deliver for ALL our clients.On top of running degal, Steve is also involved in politics and is a front bench Councillor at Southampton City Council.

Leave A Comment