HTML <progress> tag

Definition og brug

<progress> etiket repræsenterer opgavens fremdrift.

Tip:Tilføj altid <label>-etiket for at få den bedste tilgængelighed!

Se også:

HTML DOM Referencemanual:Progress-objekt

Eksempel

Vis fremdriftsindikator:

<label for="file">Download progress:</label>
<progress id="file" value="32" max="100"> 32% </progress>

Try it yourself

Tips and comments

Tip:To <progress> Combining the tag with JavaScript can display the progress of the task.

Note:<progress> The tag is not suitable for representing gauges (such as disk space usage or the relevance of query results). To represent gauges, please use the <meter> tag instead.

Attribute

Attribute Value Description
max Number Specifies the total work required for the task. The default value is 1.
value Number Specifies the part of the task that has been completed.

Global attributes

<progress> The tag also supports Global attributes in HTML.

Event attributes

<progress> The tag also supports Event attributes in HTML.

Default CSS settings

None.

Browser support

The numbers in the table indicate the first browser version to fully support this tag.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
8.0 10.0 16.0 6.0 11.0