Summary
De :required
CSS pseudo-class staat voor elk <input>
element waar de required
attribute op staat. Dit stelt formulieren in staat om gemakkelijk aan te tonen welke velden geldige data hebben voordat een formulier verzonden kan worden.
De :optional
pseudo-class kan gebruikt worden voor uiterlijk van optionele formulier velden.
Syntax
:required
Voorbeeld
Bekijk :invalid
voor een voorbeeld.
Specificaties
Specificatie | Status | commentaat |
---|---|---|
HTML Living Standard The definition of ':required' in that specification. |
Living Standard | Geen verandering. |
HTML5 The definition of ':required' in that specification. |
Recommendation | Staat voor de semantiek van HTML en validatie. |
Selectors Level 4 The definition of ':required' in that specification. |
Working Draft | Geen verandering. |
CSS Basic User Interface Module Level 3 The definition of ':required' in that specification. |
Recommendation | Staat voor de pseudo-class, maar niet voor de geassocieerde semantiek. |
Browser compatibility
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 10.0 | 4.0 (2) | 10 | 10.0 | 5.0 |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | ? | 4.0 (2) | Niet ondersteund | 10.0 | 5.0 |