Form Elements

Form Element Attribute - novalidate, method, action

The browser default is to validate the information a user places into the Form element. The novalidate attribute is used to shut that function off.

The method attribute of the form element is used to specify how the browser sends form data to a server when the user clicks the submit button.

The form action attribute specifies what should happen to data when a form is submitted on a web page. The attribute value (URL) determines where the data must be sent after the form submission.

Form Elements - fieldset and legend

The fieldset element is used to group a set of related form controls together. For example, if you have a form with multiple checkboxes that all relate to a particular topic, you can group them together within a fieldset element.

The legend element is used to provide a caption or title for the fieldset element. The text within the legend element is typically displayed in bold and centered above the fieldset.

Form Element - label and how to use attributes:
for and id

The <label> element in HTML is used to provide a label or description for a form element such as an input field, select box, or text area.

The for attribute of the <label> element is used to specify the form element that the label is associated with. The value of the for attribute should be equal to the value of the id attribute of the form element it is associated with. Using the for and id attributes in a <label> element improves accessibility and usability of forms, making it easier for users to interact with them.

Summary of the Documentation

HTML forms are a way for users to input data and submit it to a server for processing. They are created using a combination of form elements and attributes. The basic structure of an HTML form includes an opening form tag with attributes such as novalidate, method, and action followed by one or more form elements.