CSS :in-range Selector Last Updated : 29 Aug, 2024 Comments Improve Suggest changes 1 Likes Like Report The :in-range selector is used to selecting all elements that are given within a particular range value. It is mostly used in an input element with the type min/max attribute. Syntax::in-range { // CSS property} Example: html <!DOCTYPE html> <html> <head> <title>in range selector</title> <style> h1 { color: green; } input:in-range { border: 1px solid black; background: green; color: white; } body { text-align: center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>:in-range Selector</h2> <!-- If selected number is less then 20 and greater then 40 then the CSS property of input elements will change. --> Select Number: <input type="number" min="20" max="40"> </body> </html> Output: Supported Browsers: The browser supported by :in-range selector are listed below:Apple Safari 5.1 and aboveGoogle Chrome 10.0 and aboveEdge 13.0 and aboveFirefox 29.0 and aboveOpera 11.0 and above Create Quiz Comment M manaschhabra2 Follow 1 Improve M manaschhabra2 Follow 1 Improve Article Tags : Misc Web Technologies CSS CSS-Selectors Explore CSS Introduction 3 min read CSS Syntax 3 min read CSS Selectors 6 min read CSS Comments 2 min read CSS Colors 5 min read CSS Borders 5 min read CSS Margins 4 min read CSS Height and Width 4 min read CSS Outline 4 min read CSS Fonts 4 min read Like