This is a question related to time semantic markup.

Asked 1 years ago, Updated 1 years ago, 114 views

When trying to code parts such as 20:00 to 22:00,

<span>
    <time datetime="20:00">20:00</time>
    ~
    <time datetime="22:00">22:00</time>
</span>

Is this the only way to code?

<time datetime="?">20:00~22:00</time>

Isn't there a way to express it in one line code?

fast-frontend html

2022-09-22 19:41

1 Answers

Hello, I'm Yamoo. ^ -^

The datetime attribute value that describes a specific time to a specific time is not currently available in HTML 5.2 Standard Technical Document . Instead, the 98th example of a standard technical document shows an example structured using two <time> elements to describe a specific time interval.


2022-09-22 19:41

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.