Skip to content
Related Articles

Related Articles

Improve Article

HTML | <input type=”date”>

  • Last Updated : 28 May, 2019

The HTML <input type=”date”> is used to define a date picker or control field. The value will be the year, month and day.

Syntax:

<input type="date"> 

Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>HTML Input type = "Date" </title>
    <style>
        h1 {
            color: green;
        }
          
        h2 {
            font-family: Impact;
        }
          
        body {
            text-align: center;
        }
    </style>
</head>
  
<body>
  
    <h1>GeeksforGeeks</h1>
    <h2>HTML <input type="date"></h2>
  
    <input type="date" 
           id="test" 
           value="2019-07-02T25:32Z">
  
</body>
  
</html>

Output:

Supported Browsers:

  • Google Chrome 20.0
  • Firefox 57.0
  • Edge 12.0
  • Opera 10.1

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :