Form Summary
In this lesson, we learned how to use forms and discovered that:
- A form is created using the
formelement with the following attributes:action, which specifies the URL where the form data will be sent.method, which specifies the request method. Most commonlyPOST.
- Inputs are created using the
inputelement with the following attributes:name- the name of the input.id- the identifier of the input.type- the type of the input.
- Some example input types include:
password- for passwordsnumber- for numeric inputcheckbox- for checkboxesrange- for selecting a value within a specific range
- The description of an input is created using the
labelelement, which has aforattribute with the same value as theidattribute of the correspondinginputelement. - Form submission is performed using the
inputelement with the attributetype="submit"and thevalueattribute, which specifies the text to be displayed on the button. - To make an input required, we add the
requiredattribute to the input.
Instructions
Congratulations on completing the HTML course! The editor contains your final code from this lesson. Now you can customize the page using your newly acquired knowledge.
Start programming for free
9/9