Search code examples
htmlsemantics

Which HTML tag to use to display time?


I am showing current time in my web app.

I can show it in a span or a div.

But which would be semantically apt?


Solution

  • Neither <span> nor <div> has any semantic meaning at all. If you want a semantic time, use <time> instead. http://microformats.org/wiki/datetime-design-pattern