Home > Web Front-end > HTML Tutorial > time tag_html/css_WEB-ITnose

time tag_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:44
Original
1292 people have browsed it

time

The

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>
Copy after login

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=""
Copy after login

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> 分类:前端交流

你好世界!

Copy after login

Note: The pubdate attribute is released by Firefox and does not exist in W3C

HTML tag

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template