Skip to content
Related Articles

Related Articles

CSS | :in-range Selector

View Discussion
Improve Article
Save Article
  • Last Updated : 06 Aug, 2019

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 type min/max attribute.


:in-range {
    // CSS property


<!DOCTYPE html>
        <title>in range selector</title>
            h1 {
            input:in-range {
                border: 1px solid black;
            body {
        <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">


Supported Browsers: The browser supported by :in-range selector are listed below:

  • Apple Safari 10.1
  • Google Chrome 53.0
  • Firefox 50.0
  • Opera 40.0
  • Internet Explorer 13.0
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!