THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <input type="time">

❮ HTML <input> type attribute

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 Not supported 10.1

Syntax

<input type="time">

❮ HTML <input> type attribute