Forms

Form Element Attribute

novalidate: This attribute bypasses the form validation on submission. This is useful for testing forms during development.

method: This tells how to send form data. The common methods are post (data sent as a request body) and get (data appended to the URL).

action: Specifies where to send the form data when a form is submitted, which is typically a URL.

Form Elements

fieldset This is used to group related elements inside of a form, making it easier to manage sections within the form.

legend gives a caption or title for the contents of its parent fieldset.

Here is a demo from MDN showing the legend as the Choose your favorite monster.

Choose your favorite monster

Form Element: Label

label elements are used to define labels for input elements. The for attribute of the label should match the id attribute of the same input to improve accessibility.

Example: <label for="email">Email Address:</label> <input id="email" name="email" type="email" required>

Summary

These are just some basic scenarios or information on HTML form elements and attributes used in building forms. Using labeling form elements properly. As well as using Method and action correctly.