The <progress> element is used for show how much of a task is complete. You will run into it while reading other people’s HTML, and it is useful to know what job it does before copying the code.
What does <progress> mean?
Show how much of a task is complete. The tag gives the browser a specific kind of content to work with. It is more helpful to choose a tag for its meaning than because of its default look.
Value 65 out of max 100 means 65 percent complete; omit value if progress cannot yet be determined.
A working HTML example
Here is a small example you can place in an HTML page and inspect in your browser:
<label for="upload-progress">Upload progress</label>
<progress id="upload-progress" value="65" max="100">65%</progress>
Reading the example
Find the <progress> part first. Notice which elements are around it and how its content or attributes are connected to those other elements.
In this example, <progress> appears alongside label. That context is often just as important as the element itself.
The browser builds its document from these relationships. Any CSS changes appearance, while interactive JavaScript behavior must be provided separately when the example includes it.
When should you use it?
Use <progress> when you want to show how much of a task is complete. A sensible example of this on a real website is the markup shown above; it gives the browser and accessibility tools a clearer job to work with.
Common companions are label. Check the nesting requirements before moving the element into a different location.
Try it yourself
Change value to 25 and then remove it; observe determined versus indeterminate progress.
Common Beginner Mistakes
- Progress measures completion, whereas meter reports a value within a known range.
- Picking
<progress>only because it looks a certain way instead of checking what it means. - Forgetting to inspect the surrounding markup when an element does not behave as expected.
Key Takeaways
<progress>helps show how much of a task is complete.- Value 65 out of max 100 means 65 percent complete; omit value if progress cannot yet be determined.
- Start with meaningful markup, then add styling or scripting only when the page needs it.