From the course: HTML Essential Training
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Date and time
- Date and time-based content is something that is commonly used on the web. For example, news sites include publish dates on their articles, and social media platforms display timestamps for user posts. This can help us understand how old or recent the content is. It can also be used to add functionality, such as calendar reminders, or to search for results based on a date range. In HTML, the time element is used to define a specific period in time. The content you want to display in the browser is added between the tags. This can be whatever format you prefer. Use the datetime attribute to format the date into machine-readable format. The values can be represented as time on a 24-hour clock, a calendar date, or a duration. To define the time, the values must follow these formats, hours and minutes, hours, minutes, and seconds, or hours, minutes, seconds, and milliseconds. To define the dates, the value can include the year and month, the year, month and day, or just the month and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Paragraphs and headings5m 41s
-
(Locked)
Ordered, unordered, and description lists5m 50s
-
(Locked)
Quotations3m 59s
-
(Locked)
Exercise: Formatting text, part 13m 4s
-
(Locked)
Date and time1m 48s
-
(Locked)
Bold and italics2m 25s
-
(Locked)
Character entity reference4m 39s
-
(Locked)
Exercise: Formatting text, part 21m 43s
-
(Locked)
Code and line breaks1m 21s
-
(Locked)
HTML and typography1m 29s
-
(Locked)
Challenge: Write text-based HTML markup for course project2m 52s
-
(Locked)
Solution: Demo3m 46s
-
(Locked)
-
-
-
-
-
-
-