HTML Forms
An HTML form is used to collect user input such as name, date of birth etc. Detail of HTML forms are given below:
Forms:
Forms are used to add user information. First of fall you write <form></form>. It started creating your from. Under the form tag, we write a label and under the label, we write a question or keywords such as Your Name, Your Date of Birth etc. And then we make a box where the user can add its name or password. Input also has built with attributes such as, type, id and name. and also we add input were we can add type submit.
For Example:
<form action="/action_page.php">
<label>Your Name:</label><br>
<input type="text" id="name" name="name"><br>
<label>Password:</label><br>
<input type="text" id="password" name="password"><br><br>
<input type="submit" value="Submit">
</form>
Output of this code is link given below:
https://www.w3schools.com/html/tryit.asp?filename=tryhtml_form_submit
Under type we write type of the name and if you want you to remove the ‘for’ type from label.
Check more examples of forms: https://www.w3schools.com/html/html_forms.asp
And also check the forms attributes, the link is given below:
Comments
Post a Comment