From the course: HTML Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Dates and times

Dates and times - HTML Tutorial

From the course: HTML Essential Training

Start my 1-month free trial

Dates and times

- Dates, let's talk about dates and times. If you've done any programming in any language, and you know that handling dates and times can get messy quick, well not so much in HTML. HTML simply has one element that we use to mark anything that's specifying a time of day, a date, or span of time, the time element. We use the time element to format a date or time, anything that's related to a specific moment or range in time, into something other computers can understand. The time element has an opening and a closing tag, the opening time tag, May 8th the closing time tag. Or like this with year, May 8th 2025. Well or some people write dates like that, others write it like this 8th May 2025. We can use any human understandable format for the phrase of text that's between the tags. That's what will get displayed on the webpage, that's what other humans will see. But the whole point of this element is to convey to computers…

Contents