Articles → HTML 5 → Month Input Element In Html5

Month Input Element In Html5






Purpose





Syntax


<input type="month"/>



Example


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Month Input Form</title>
</head>
<body>
    <form>
        <label for="monthInput">Select a month:</label>
        <input type="month" id="monthInput" name="monthInput">
    </form>
</body>
</html>

Try It


Output


Picture showing the output of the Month input element in HTML5
Click to Enlarge


Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
12.0Not Supported25.0Not Supported10.1Yes



Posted By  -  Karan Gupta
 
Posted On  -  Saturday, November 24, 2018

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250