What is the <progress> element in HTML?
In HTML, the <progress> element is used to display the completion progress of a task. <progress> shows an indicator typically displayed as a progress bar.
Syntax
<progress max="" value=""> progress percentage </progress>
Where:
max: Takesnumberas its value and specifies the maximum or total value required by the task. The default value is1.value: Takesfloating point numberas its value and specifies the amount of task that has been completed. It must be a valid number between0andmax(1ifmaxis not defined).
If the
valueattribute is undefined, the progress bar is in an indeterminate state, which indicates an ongoing task without any expected completion time.
Example
The following code demonstrates the use of the <progress> element in HTML.
The progress bar of content is written with both the opening and closing tags, <progress> and </progress>.