Applied Accessibility -9 Standardize Times with the HTML5 datetime Attribute
Standardize Times with the HTML5 datetime Attribute
HTML5 also introduced the
time element along with a datetime
attribute to standardize times. This is an inline element that can wrap
a date or time on a page. A valid format of that date is held by the datetime
attribute. This is the value accessed by assistive devices. It helps
avoid confusion by stating a standardized version of a time, even if
it's written in an informal or colloquial manner in the text.
example:
<p>Master Camper Cat officiated the cage match between Goro and Scorpion
<time datetime="2013-02-13">last Wednesday</time>, which ended in a draw.</p>
Master Camper Cat officiated the cage match between Goro and Scorpion , which ended in a draw.
Comments
Post a Comment