HTML ins datetime 属性
htmlweb developmentfront end technology更新于 2025/6/17 8:44:17
<ins> 元素的 datetime 属性用于指定文本插入时显示的日期和时间。
以下是语法 −
<ins datetime="YYYY-MM-DDThh:mm:ssTZD>
上图中,属性 datatime 以以下格式显示插入文本时的日期时间 −
- YYYY - 年
- MM - 月
- DD - 日
- hh - 小时
- mm - 分钟
- ss - 秒
- TZD - 时区指示器
现在让我们看一个实现 <ins> 元素的 datetime 属性的示例 −
示例
<!DOCTYPE html> <html> <body> <h1>Demo Heading</h1> <ins cite = "new.htm" datetime = "2019-05-11T18:30:03Z">Text is inserted.</ins> </body> </html>
输出

在上面的例子中,我们使用 <ins> 元素插入了一段文本 −
<ins cite = "new.htm" datetime = "2019-05-11T18:30:03Z"> 文本已插入。 </ins>
上面,我们使用 cite 属性设置了插入原因 −
cite="new.htm
此外,我们使用 datetime 属性设置了插入日期。 −
datetime = "2019-05-11T18:30:03Z
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

