HTML <input type=”month”>
Last Updated :
02 Apr, 2024
The HTML <input type=”month”> is used to specify the control of month and year field. The value must be in the format of “YYYY-MM”.
Syntax:
<input type="month">
Example:
HTML
<!DOCTYPE html>
< html >
< head >
< title >
HTML input type month
</ title >
</ head >
< body style = "text-align:center;" >
< h1 >GeeksForGeeks</ h1 >
< h2 >HTML < Input type = "month" ></ h2 >
< form id = "myGeeks" >
< input type = "month" id = "month_id"
name = "geeks" >
</ form >
</ body >
</ html >
|
Output:
Supported Browsers: The browsers supported by <input type=”month”> are listed below:
- Google Chrome 20.0 & above
- Edge 12.0 & above
- Opera 11 & above
- Firefox not supported
- Internet Explorer not supported
- Safari not supported
Share your thoughts in the comments
Please Login to comment...