HTML CSS examples for CSS Selector:out-of-range
The :out-of-range selector selects all elements whose value is outside the range.
The :out-of-range selector only works with elements who have min and max attributes.
Select if the value of the <input> element is "out of range":
<!DOCTYPE html> <html> <head> <style> input:out-of-range { border: 2px solid red; } </style><!-- w w w . j a v a 2s. co m--> </head> <body> <input type="number" min="5" max="10" value="17"> <p>the range is between 5 and 10.</p> </body> </html>