HTML <input type=”month”>
The HTML <input type=”month”> element creates a month picker, allowing users to select a specific month and year without specifying a day. It provides a standardized way to input month-based data to enhance user experience.
Syntax
<input type="month">
Example: This example demonstrate the use of HTML <input type=”month”> element.
<!DOCTYPE html>
<html>
<head>
<title>
HTML Input Type Month
</title>
</head>
<body style="text-align:center;">
<h2>HTML <input type="month"></h2>
<form id="#">
<label for="month">Enter Month:</label>
<input type="month" id="month" name="month">
</form>
</body>
</html>
Output
Supported Browsers
The browsers supported by <input type=”month”> are listed below:
- Chrome 20
- Edge 12
- Opera 11
- Firefox Not Supported
- Safari Not Supported