百度成立
发布 <time datetime="2015-03-21" pubdate>2015年03月21日</time> 分类:前端交流
你好世界!
time element is also a text tag. Because it is a brand new tag, we will introduce it separately. The time element is used to mark the publication time of an article.
<time datetime="2015-03-21" pubdate>2015年03月21日</time>
The shape of the code is as above, knowing that the time tag generally has three components
机器可识别的时间戳:格式必须是年月日的数字以减号相隔,如果增加时间,那就在日期后面加字母T然后跟24小时格式的时间值以及时区偏移量,形如datetime="2015-3-21T9:40:40+08:00"人可识别的文本内容:格式随意,只要能看懂。一个可选的`pubdate`标记:`pubdate`是个布尔值,如果需要,写上属性名就好`pubdate`。但是为了美观,我们也可以写成pubdate=""
We also need to note that if the time is located in an article, then it means this The publication time of this article; if it is not in article, it means the publication time of the entire document.
百度成立
发布 <time datetime="2015-03-21" pubdate>2015年03月21日</time> 分类:前端交流
你好世界!
Note: The pubdate attribute is released by Firefox and does not exist in W3C
HTML tag