html input type date format
SyntaxSyntax of HTML <date> tag
<input type="datetime" id="date">
html input type date format
Example
<!DOCTYPE html>
<html>
<head>
<title> HTML Input Type Date </title>
</head>
<body>
<center>
<h1> HTML input type="date" element</h1>
<form>
<label>Select your Birthdate :-</label>
<input type="date" id="date" >
</form>
</center>
</body>
</html>
html input type date format
Explain Program
Step 1]
<!DOCTYPE html>
This declare the document type.
browser that the document is written in html
Step 2 ]
<html>.... . </html>
html is the root element of the html page.
Every thing inside it is part of the webpage.
Step 3]
<head>
<title> HTML Input Type Datetime </title>
</head>
<head> section
head section contains metadata about page. not visible on the page itself.
<title> tag
title section set the title of the page shows the browser tab.
Step 4]
<body><center>
< body> tag contains all the content visible to webpage.
<body> tag contains all the visible content of the page.
inside <body> show the browser screen.
<center> all the content center
Step 5]
<h3> HTML input type="date" element</h3>
<h3> tag is a level 3 heading.
display a title on the page
Step 6]
<form>
<label>Select your Birthdate :-</label>
<input type="date" id="date" >
</form>
<form> tag defines HTML form user can input data.
<label>Select your Birthdate :-</label>
<label> tag provide Text label for input field. Select your Birthdate
label tag accessibility because screen readers can read the label user understand input.
allows user to click on the label to focus input user.
<input type="date" id="date">
<input type> create a date input field.
id assign unique identifier.
user click the field and choose date [ dd-mm-yyyy ] picker.
Step 7]
closing the Tag
</center>
</body>
</html>
html input type date format
Output
Related Post :-
