Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

HTML <input type="month">

❮ HTML <input> type attribute


Define a month and year control (no time zone):

<label for="bdaymonth">Birthday (month and year):</label>
<input type="month" id="bdaymonth" name="bdaymonth">
Try it Yourself »

Definition and Usage

The <input type="month"> defines a month and year control.

The format is "YYYY-MM".

Tip: Always add the <label> tag for best accessibility practices!

Browser Support

The numbers in the table specify the first browser version that fully supports the element.

type="month" 25.0 12.0 Not supported Not supported 10.1


<input type="month">

❮ HTML <input> type attribute