Element: Input

The input element is the most flexible and versatile of the form controls.

Examine the source code of this document for details

Semantic, Accessible Inputs

All inputs must have either a placeholder or label to ensure maximum accessibility:

A form with inputs using labels

A form with inputs using only placeholder attribute (NOT accessible!)

A form with inputs using both placeholder and labels

NOTE: the labels here are hidden from view, but NOT hidden from screen readers and accessibility devices. See the associated stylesheet .sr-only rule.

Input Variations

A very versatile element, how an input works is determined by its type attribute.

Please fill out this form:

Checkboxes:

Which schools have you attended?

Radio Buttons:

Which gender do you identify as?