HTML input type time Tutorial

In this section, we will learn what HTML <input type= “time”> element is and how to use it.

What is input type time in HTML?

Using HTML <input type = “time”> will create a field with controls with which we can pick a time (Hours, and Minutes) instead of typing that value down.

So if in a form of a document, we needed users to enter time as well, we can use this element to help users pick the time faster and easier.

HTML input type time Syntax:

<input type = “time”>

HTML input type time Return Value

The return value of this element is in this format: Hours:Minutes

For example: 22:34

Example: using <input type=”time”> in HTML

See the Pen using <input type=”time”> in HTML by Omid Dehghan (@odehghan) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies