CSS :outofrange Selector (original) (raw)

CSS :out-of-range Selector

Last Updated : 29 Aug, 2024

The:out-of-range selector is used to select the elements that are lying outside the given range. This selector only works for an input element with max and min attributes.

**Example Application: The marks of a student should be from 0 to 100. If an instructor tries to enter an outside range, we can highlight the value out of range.

**Syntax:

:out-of-range {
// CSS property
}

**Example:

HTML `

out of range selector