# Form Controls Reference A consolidated reference guide covering HTML form structure, native form controls, HTML5 input types, and additional form elements. Content sourced from the Mozilla Developer Network (MDN) Web Docs. --- ## Table of Contents 1. [How to Structure a Web Form](#how-to-structure-a-web-form) 2. [Basic Native Form Controls](#basic-native-form-controls) 3. [HTML5 Input Types](#html5-input-types) 4. [Other Form Controls](#other-form-controls) --- ## How to Structure a Web Form > **Source:** https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/How_to_structure_a_web_form ### The `
` Element The `` element formally defines a form and determines its behavior. It must wrap all form contents. **Important:** Never nest a form inside another form -- this causes unpredictable behavior. ```html
``` Form controls can exist outside a `
` element using the `form` attribute to associate them with a specific form by its ID. ### Grouping and Semantic Structure #### The `
` and `` Elements `
` groups widgets that share the same purpose, improving usability and accessibility. `` provides a descriptive label for the fieldset. **Key Benefits:** - Screen readers (like JAWS and NVDA) speak the legend before each control inside the fieldset - Essential for grouping radio buttons and checkboxes - Useful for sectioning long forms across multiple pages ```html
Fruit juice size

``` **Result:** Screen readers announce: "Fruit juice size small," "Fruit juice size medium," "Fruit juice size large" ### Labels: The Foundation of Accessibility #### The `