Submit Reset
A one-time code field. autocomplete="one-time-code" lets browsers and password managers offer SMS/generated codes, inputmode="numeric" raises a numeric keyboard on touch devices, and pattern="[0-9]*" restricts the value to digits.
autocomplete="one-time-code"
inputmode="numeric"
pattern="[0-9]*"
What do you wanna do today?
Choose
Required — on a checkbox, required means this box must be checked. There is no native "at least one of the group" constraint, so it only fits standalone consent. For a required either/or choice, use radio buttons (see Radio Button Group).
required
The indeterminate state has no HTML attribute — it can only be set via JavaScript (el.indeterminate = true). Use the CSS pseudo-class :indeterminate for styling.
indeterminate
el.indeterminate = true
:indeterminate
Choose (required)
<select> has no native readonly attribute. Three workarounds, each with different trade-offs:
<select>
readonly
option[disabled]
select[disabled]
<input type="hidden">
The low, high, and optimum attributes define three zones. Browsers colour the bar green, yellow, or red based on how far the current value is from the optimum zone.
low
high
optimum
formnovalidate
A submit button with formnovalidate skips this form's native validation, so it submits even while the required field below is empty.
role="group"
An alternative to <fieldset> + <legend>. The group label is provided by an element referenced with aria-labelledby.
<fieldset>
<legend>
aria-labelledby