Html progress | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Html progress

e.g.: <progress min="0" max="100" value="15"/> Instead of "15" let's say that i want to put a variable from JavaScript, so that the progress value is not constant. Also, i want to change its color. Maybe with id in CSS.

1st May 2018, 10:28 AM
Nicolae Ionescu
Nicolae Ionescu - avatar
2 Answers
+ 5
var newProgress= 28; var progressEl= document.getElementById("myProgress"); progressEl.value= newProgress; stylizing it its not simple because browsers allow it (in some degree) in different ways https://css-tricks.com/html5-progress-element/ If you want more control, you can easly emulating it with div so you can style it in better way and more cross-browser
1st May 2018, 10:47 AM
KrOW
KrOW - avatar
1st May 2018, 11:15 AM
Yugabdh
Yugabdh - avatar