Home  >  Article  >  Web Front-end  >  How to use html time tag

How to use html time tag

青灯夜游
青灯夜游Original
2019-05-27 16:45:244005browse

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.

How to use html time tag

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:

How to use html time tag

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!

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
Previous article:How to use html ul tagNext article:How to use html ul tag