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!