如何在 HTML 中显示人性化的日期?
htmlweb developmentfront end technology更新于 2024/8/2 5:32:17
使用 HTML <time> 标签显示人性化的日期和时间。以下是 − 属性。
| 属性 | 值 | 描述 |
|---|---|---|
| datetime | datetime | 它是机器可读的日期时间 |
示例
您可以尝试运行以下代码来显示时间 −
<!Doctype html> <html> <head> <title>HTML time Tag</title> </head> <body> <p>The time is <time>18:16 pm</time></p> </body> </html>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

