Horje

How to add HTML <input type="date">

Show a date control.

Definition and Usage

The <input type="date"> defines a date picker.

The resulting value includes the year, month, and day.

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.

Syntax

<input type="date">

index.html
Example: HTML
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday"> 

Output should be:

How to add HTML <input type="date">




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin