开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜