CSS · More selectors

:in-range / :out-of-range

Matches number and date inputs whose value is inside or outside the min and max.

Syntax
:in-range

Example

Try it

More in this group

::backdrop ::file-selector-button ::first-letter ::first-line ::marker ::part() ::slotted() ::target-text

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course