HTML <time>元素表示世纪时datetime属性的正确格式是什么?
用HTML
对于表示“20th century”(20世纪)这类时间段,
具体格式选项:
- 完整日期范围(严谨的公历世纪划分:20世纪为1901年1月1日至2000年12月31日):
In the <time datetime="1901-01-01/2000-12-31">20th century</time> things changed a lot. - 简化年份范围(省略具体月日,适合无需精确到天的场景):
In the <time datetime="1901/2000">20th century</time> things changed a lot. - 大众常用的世纪范围(部分场景下20世纪被默认指1900-1999年):
In the <time datetime="1900/1999">20th century</time> things changed a lot.
用法正确性说明:
你这里用
内容的提问来源于stack exchange,提问作者MiguelMJ
相关产品推荐
相关产品推荐

