MDN's Form Elements Attributes

CSS Forms are a great way of collecting user data and information. It can be a simple form setup to collect names, emails, locations, or any sort of data that may help make user experiences better. Of course, having a place to send all that data is also necessary to collecting this data and being able to use it. First is novalidate, a simple boolean value that, when set, overrides the forms validation when submitted, thus ruling it invalid. Next is the method, which is used to determine how the data is submitted. There are three attributes to his; post, get, and dialog. Post, in short, means the form is being processed "as a new subordinate of the resource identified by the Request-URI in the Request-Line." Get is a pretty self explanatory one; this just retrieves informtion identified via the Request-URI. The final one is dialog, which is when the form is inside a dialog element. This means there will be a submit event on submission without any data being submitted or cleared. Next is action, which is URL that processes the submission. This is where the data is delivered and processed before being stored and returning information to the user. This is ignored in the case of the 'method="dialog"' being used.

Fieldset and Legend

In regard to forms, a fieldset is the area in which there are inputs set for the user to provide data. This could be a set of text boxes, radio buttons, checkboxes, or any other form element used for data collection. The legend is a space for text to be used as a caption of sorts for the form, such as a title or a question to determine the fieldset.

Label Element

The label for an input area is both used to label the section to tell the user what they're selecting, as well as being supportive to impaired users, determining that this is something where data can be placed. The id attribute provides a name for the browser to place on a label and its input. This id allows the 'for' attribute to be used to provide direction for the label to an input element.

To Summarize

Forms have many ways of collecting and delivering data to where it matters. Being able to collect user data is a big part of the web development process, especially for user feedback. Being able to stay in touch with your users is a key aspect of running a website or page, and understanding how to use and deploy forms properly is necessary for being able to accomplish that.