datetime - HTML5 empty <time> tag for date of publication -
i'm confused html5 <time> semantic tag. seems me it's tagging strings such "today", "last christmas", "10.10.2010", "2am" etc. machines recognize , understand them. valid examples find on html5 doctor , w3c page like:
<p>i have date on <time datetime="2008-02-14">valentines day</time>.</p> <p>we open @ <time>10:00</time> every morning.</p>
if want set article publication date (e.g. google robots), without string displaying it? valid have:
<article><time datetime="..."></time> content </article> or:
<article><time datetime="..." /> content </article> or should other way?
(it seems hilarious me have e.g. <time datetime="...">...</time> , css display:none time selector...)
the time element contains datetime value in machine-readable (the datetime attribute) , human-readable (the text content) formats.
the datetime value of
timeelement value of element'sdatetimecontent attribute, if has one, or element'stextcontent, if not.
so if datetime attribute absent, datetime value parsed text content.
if datetime attribute present, free write text content, or nothing in case.
Comments
Post a Comment