HTML input type month Tutorial

In this section, we will learn what the <input type = “month”> element is and how to use it in HTML.

What is input type month in HTML?

The <input type = “month> element is used to create a field with controls that people can use to pick a year as well as month instead of typing that date down!

The return value from this element has the following format: Year-Month

For example: 2021-12

HTML input type month Syntax:

<input type = “month”>

Example: using <input type=”month”> in HTML

See the Pen using <input type="month"> in HTML by Omid Dehghan (@odehghan) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies