In this article we are going to discuss, how to code in HTML for adding date of birth in registration form. Now we will use form attribute for adding input tag of date of birth. So users can enter their date of birth in the registration form.
We can add option for filling date of birth for users as follows, firstly we need to create a form attribute and also need to create an input tag like this <input> elements of type=”date” and next we will create an input field that allows the user to enter a date which is definitely user’s date of birth, either with a textbox that validates the input or a special date picker for the user. The resulting value will include the year, month and day, but remember not the time. Because the input type=”date” does not support time.
Here is an example which can give you a better understanding for adding date of birth in the registration form.
<title> HTML input type date </title>
Select date of birth : <input type="date"><br>
Hope this will help.