The Use of the Datetime Attribute in HTML

What exactly is the purpose of the datetime attribute in HTML (that is used in the “time” tag)?
Does it help with SEO, or is it just for a developer to know when a particular section of code was written. And if it is solely for the developer why wouldn’t we just use comments?

Comments are not parsed by user agents. Attributes, on the other hand, are, and their semantics tell search engines exactly what type of information is contained in the text node. What’s more, the values are machine readable and can be used to create custom reminders.

The Living Language is largely concerned with semantics. Most of the new (now not so new) elements introduced in the past six or seven years are focused on meaning, giving hints to the user agent as to the role the elements play in the page.

1 Like