novalidate, method, and action elements
The first form level elements we will be talking about are novalidate, method and action elements. The first is novalidate. Novalidate prevents native validation from happening on the form, meaning that the results of a form submit can only be validated by outside means, such as a javascript file. This also helps to allow the user to continue even if they don't have all the information, and could potentially come back later. The second element is the method element. This determines whether or not the values entered into a form are shown at the top of the address bar. GET will show them, and POST will not show them. It's important to use POST for security reasons. The Final element is the Action element. It is used to point the user to a certain site after the form is submitted. It can either go outside of the website, or somewhere within it.
Fieldset and Legend elements
The next two elements we have are Fieldset and Legend. Fieldset is used for grouping a collection of elements in a form together. The Legend element serves as the equivalent of a Title element for a form. Both of these elements excel at grouping form elements together and giving it a focus.
Label, For, and ID
The last 3 elements we'll talk about are the Label, For, and ID elements. The Label element can be used alongside any other input elements, like for, input, and ID. using this element allows the text within to be read aloud, which allows for more accessibility. It also allows certain things, like checkboxes, to have a larger click area. The For element indicates the specific element on the form that the label describes. Finally, the ID element assigns a unique identifier to the specific element.
Summary
In Summary, we talked about 8 different elements used in Forms. novalidate, which prevents validation from happening on the form, method, which determines if results show in the address bar, action, which determines how and where the user is sent after posting the form, fieldset and legend, which help with proper formatting on the form, and Label, Form, and ID, which help with both identifying the specific elements in the form in HTML, and accessibility purposes.