HTML time specific usage and function

Source: Internet
Author: User
This article will introduce you to the specific usage and function of the time tag in HTML . In HTML <time> tags do not seem to be very extensive, some novices may be the first to hear. But as the saying goes, existence is reasonable. Infrequently used does not mean that it is useless. Time, as the name implies, is the meaning of timing. So in HTML, it's also time-dependent.

Let's give you a detailed example of the use and usefulness of time in HTML using simple code examples.

<p> we are in <time datetime= "2018-09-10" > Teachers ' Day </time> prepare gifts for teachers! </p>

This simple piece of code we visit on the browser appears to have the effect:


We can see that only a paragraph of text appears on the page, and the contents of the <time> tag we added are not displayed on the page. In fact, because the time tag is used to represent the HTML page in the date and times, but not for the user to see, but to ourselves or search engines and other machines to see. Such other programs such as search engines will be easier to extract the information more intelligently, compared to the average date, the time tag will be more quickly crawled by the search engine.

Note that time must be used with the DateTime attribute, and the value after DateTime is the date and time you want to label!

For more HTML-related knowledge, you can learn "HTML video tutorial" and "HTML manual"!

So the above is about the specific use of <time> tags in HTML and the role. Hope to have the help of friends who need!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.