HTML time tag for duration

▼魔方 西西 提交于 2019-11-30 20:44:01

Yes, you can use the time element for durations.

But the value has to be a valid duration string, which "3:30 min" is not.

You can use the datetime attribute to specify the correct value, and keep "3:30 min" as element content, e.g.:

<time datetime="3m 30s">3:30 min</time>

If the spec allows the time element to have a duration as a value, it means it can be used this way. The only limitation I found in the spec is that you can't specify months or years for a duration — only weeks, days, hours, minutes, and seconds. But it shouldn't be a problem for a duration of the video).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!