pseudo-class

:out-of-range — CSS reference

Matches a value violating a supported range bound. Not every invalid value is out of range.

Formal Syntax & Structure

css syntaxcss
:out-of-range

Working Example

Example Snippetcss
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Selector lab</title><style>:where(.sample) { color: rgb(32, 32, 32); }input:out-of-range { color: rgb(0, 96, 80); }</style></head><body><label>A <input id="a" class="sample" type="number" min="1" max="5" value="9"></label><label>B <input id="b" class="sample" type="number" min="1" max="5" value="3"></label></body></html>
CSS Reference