<input min="0" max="100" step="5" value="10" type="range" />
<div></div>
div {
  font-size: 30pt;
  color: #999;
}
const rng = document.querySelector('input');
const div = document.querySelector('div');

const onInput = () => {
  if (rng.value > 80) {
    rng.value = 80;
  }
  div.innerText = rng.value;
};

rng.addEventListener('input', onInput);
onInput();

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.