Edit in JSFiddle

input:out-of-range {
  border: 5px solid red;
}
input:in-range {
  border: 5px solid green;
}
<input type="number" min="10" max="20">