Form Structure: form, action and method
Every form is a container, a set of named controls and a submit button. Learn what action and method do, why name matters more than id, and what the b...
Form structure, every input type, labels, built in validation, and the difference between GET and POST.
9 notes
Every form is a container, a set of named controls and a submit button. Learn what action and method do, why name matters more than id, and what the b...
One element, more than twenty types. Choosing the right one gives you the correct mobile keyboard, free validation and better autofill, at no cost.
A label names a field for every reader and grows its click target. Two ways to bind one, and the reasons a form without labels is not usable.
Checkboxes for many answers, radios for one. The name attribute is what groups radios, and fieldset with legend is what makes either group make sense.
Dropdowns done properly: grouping options, multiple selection, the placeholder option trick, and when a datalist beats a select.
Three controls with their own rules: a textarea whose value is its content, a file input that needs the right enctype, and hidden fields that are not...
Three button types, one attribute, and a default that causes more accidental submissions than any other rule in HTML.
The browser can check most of a form before it is sent, with no JavaScript. Learn the attributes, the CSS hooks, and why none of it replaces server va...
Two methods, two very different places for your data. Learn which to use, what is safe in a URL, and why neither is encrypted on its own.