Link with time tag
What would be the correct?
<a>
<time>TIME_HERE</time>
</a>
开发者_JAVA技巧
or
<time>
<a>TIME_HERE</a>
</time>
Or maybe none of the above are valid.
The specification indicates that without a datetime
attribute the content should be a valid date or time string, thus the anchor
should wrap the time
element rather than the reverse. If a datetime
attribute is present, the contents need not specify a date or time and you could conceivably have an anchor
tag inside. Note that none of the examples in the specification have descendent elements (other than text nodes) inside a time element.
http://www.w3.org/TR/html5/text-level-semantics.html#the-time-element
精彩评论