Form Element Attribute - novalidate, method, action
- The novalidate attribute means the form will not get validated when submit it, for example, enabling this attribute will let users save the form and continue/submit it later
- The form method tells the browser how to send form data to a web server. There are two values: GET and POST. GET makes the result visible in URL while POST will send the data to the web sever to be processed.
- The action attribute specifies where the form data will be sent after the submission. Usually the data goes to the server.
Form Elements - fieldset and legend
- The fieldset is used to group related elements in the form and it also created the box over them.
- The legend tag creates a caption for the fieldset.
Form Element - label and how to use attributes: for and id
- The label tag defines a text label for the input tag. To associate label element with input we need to add id attribute to the input and for attribute to the label.
- The value of for attribute to the label element is the same as id in the input element. If you put input directly inside the label, the for and id attributes are not needed. The value for the for attribute matches the id attribute.
Summary of the documentation
In conclusion, form element is used to collect user input. The form element is a container for different types of input elements such as textfields, checkboxes, buttons etc.