How to use time input type in HTML?

HTMLWeb DevelopmentFront End Technology

The time input type is used in HTML using the <input type="time">. Using this, allow the users to select time. A time picker popup is visible whenever input field is clicked.

Note: The input type time is not supported in Firefox and Internet Explorer. It works on Google Chrome.

Example

You can try to run the following code to learn how to use time input type in HTML.

<!DOCTYPE html>
<html>
   <head>
      <title>HTML input time</title>
   </head>
   <body>
      <form action = "" method = "get">
         Details:<br><br>
         Student Name<br><input type="name" name="sname"><br>
         Exam Time<br><input type="time" name="etime"><br>
         <input type="submit" value="Submit">
      </form>
   </body>
</html>
raja
Published on 23-Jan-2018 15:04:23
Advertisements