Home » HTML Date

HTML Date

The date is the value of the type attribute of an <input> element. It creates a calendar that allows a user to choose the date. The resulting value includes the day, month, and year.

Syntax

Example 1: The following example describes how to use the date in <input> tag:

Test it Now

Output:

HTML Date

Example 2: The following example uses the JavaScript code for displaying the date which is entered in form.

Test it Now

Output:

HTML Date

Browser Support

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
<type=”Date”> Yes Yes Yes Yes Yes

Next TopicHTML Form Action

You may also like