HTML <input type="time">
Example
Define a control for entering a time (no time zone):
<label for="appt">Select a time:</label>
<input type="time"
id="appt" name="appt">
Try it Yourself »
Definition and Usage
The <input type="time">
defines a control for entering a time
(no time zone).
Tip: Always add the <label>
tag
for best accessibility practices!
Browser Support
The numbers in the table specify the first browser version that fully supports the element.
Attribute | |||||
---|---|---|---|---|---|
type="time" | 20.0 | 12.0 | 57.0 | 14.1 | 10.1 |
Syntax
<input type="time">