Home >Web Front-end >HTML Tutorial >What is the use of time tag?

What is the use of time tag?

云罗郡主
云罗郡主Original
2019-02-21 15:10:585088browse

What is the use of time tag?

The time tag defines a Gregorian time (24-hour clock) or date. The time and time zone offset are optional. This element is capable of encoding the date and time in a machine-readable way, such that , for example, user agents can add birthday reminders or scheduled events to the user's calendar, and search engines can generate smarter search results.

html time tag Syntax

Function: Define the Gregorian calendar time (24-hour clock) or date, time and time zone offset are optional.

Description: This element can encode the date and time in a machine-readable way so that, for example, user agents can add birthday reminders or scheduled events to the user's calendar, and search engines can Ability to generate smarter search results.

Note: The 46dd80ba616c57a652514755c74c4211 tag does not render any special effects in any browser.

html time tag example

<!DOCTYPE HTML>
<html>
<body>
<p>
我们在每天早上 <time>9:00</time> 开始营业。
</p>
<p>
我在 <time datetime="2010-02-14">情人节</time> 有个约会。
</p>
</body>
</html>


The above is the detailed content of What is the use of time tag?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn