If it's possible to set a marker on "meter" tag?

Viewed 87

I would like to know if it is possible to set some marker on the "meter" tag in HTML5?

      <meter id="signalGreen" min="0"  max="100" value="45"></meter>   

For example, if I want to set marker when the value will pass 90. Thanks.

1 Answers

You can add class attribute with certain class name for this tag:

`<meter class="over-the-range" id="disk_c" value="2" min="0" max="10">2 out of 10</meter>`

Then you should use elem.className or elem.classList methods for changing class attribute like this:

document.body.classList.add('your-class');

Related