You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.28 19:42:11