skip to Main Content

With the time element you can add a machine readable date time:

The HTML <time> element represents either a time on a 24-hour clock or
a precise date in the Gregorian calendar (with optional time and
timezone information). [1]

Is there a way to describe a machine readable time interval e.g. the business of a shop? So we have something like this

<time datetime ="???">09:00 - 12:00</time>

and if yes does this make sense for SEO?

2

Answers


  1. Yes you can mark up time durations using the time element, for example:

    <time datetime="PT23H 9M">23 hours, 9 minutes</time>
    

    Is it useful for SEO? No, at least not yet, but I would recommend using this markup if you can so you are future ready!

    For more information see best of time.

    Login or Signup to reply.
  2. While you can (and should) use the time element for durations, it doesn’t convey what this duration is for.

    If you want to convey that these are the opening hours of a shop, you might want to include structured data. For example, by using the syntax RDFa together with the vocabulary Schema.org (which is supported by several search engines).

    Schema.org provides the openingHoursSpecification property, which takes an OpeningHoursSpecification as value.

    In RDFa (Lite), this could look like:

    <body typeof="schema:LocalBusiness">
    
      <div property="schema:openingHoursSpecification" typeof="schema:OpeningHoursSpecification">
    
        <time datetime="3h">
          <time property="schema:opens">09:00</time> - <time property="schema:closes">12:00</time>
        </time>
    
      </div>
    
    </body>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search