<html>
<head>
<style>
input:in-range {
border: 2px solid green;
background-color: beige;
}
</style>
</head>
<body>
<h1>Demo of :in-range</h1>
<p>Input a number between 1 and 10: <input type="number" min="1" max="10" value="7"></p>
<p>Try typing a number out of range (less than 1 or higher than 10), to see the styling disappear.</p>
</body>
</html>