Home > Article > Web Front-end > How to use html time tag
The
time tag is a new tag in HTML5, used to define the Gregorian calendar time (24-hour clock) or date, where the time and time zone offset are optional; this element can compare the date and time in a machine-readable way Encode. Note: The time tag will not render any special effects in any browser.
html How to use time tag?
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, the user agent can add birthday reminders or scheduled events to the user's calendar In the table, search engines are also able to generate smarter search results.
Note: The
html time tag example
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <p> 我们在每天早上 <time>9:00</time> 开始营业。 </p> <p> 我在 <time datetime="2010-02-14">情人节</time> 有个约会。 </p> </body> </html>
Rendering:
The above is the detailed content of How to use html time tag. For more information, please follow other related articles on the PHP Chinese website!