Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

<progress>: The Progress Indicator element

BaselineWidely available

The<progress>HTML element displays an indicator showing the completion progress of a task, typically displayed as a progress bar.

Try it

<label for="file">File progress:</label><progress max="100" value="70">70%</progress>
label {  padding-right: 10px;  font-size: 1rem;}

Attributes

This element includes theglobal attributes.

max

This attribute describes how much work the task indicated by theprogress element requires. Themax attribute, if present, must have a value greater than0 and be a valid floating point number. The default value is1.

value

This attribute specifies how much of the task that has been completed. It must be a valid floating point number between0 andmax, or between0 and1 ifmax is omitted. If there is novalue attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take.

Note:Unlike the<meter> element, the minimum value is always 0, and themin attribute is not allowed for the<progress> element.

Note:The:indeterminate pseudo-class can be used to match against indeterminate progress bars. To change the progress bar to indeterminate after giving it a value you must remove the value attribute withelement.removeAttribute('value').

Accessibility

Labelling

In most cases you should provide an accessible label when using<progress>. While you can use the standard ARIA labelling attributesaria-labelledby oraria-label as you would for any element withrole="progressbar", when using<progress> you can alternatively use the<label> element.

Note:Text placed between the element's tags is not an accessible label, it is only recommended as a fallback for old browsers that do not support this element.

Examples

html
<label>  Uploading Document: <progress value="70" max="100">70 %</progress></label><!-- OR --><br /><label for="progress-bar">Uploading Document</label><progress value="70" max="100">70 %</progress>

Result

Describing a particular region

If the<progress> element is describing the loading progress of a section of a page, usearia-describedby to point to the status, and setaria-busy="true" on the section that is being updated, removing thearia-busy attribute when it has finished loading.

Examples

html
<div aria-busy="true" aria-describedby="progress-bar">  <!-- content is for this region is loading --></div><!-- ... --><progress aria-label="Content loading…"></progress>
Result

Examples

html
<progress value="70" max="100">70 %</progress>

Result

Technical summary

Content categoriesFlow content,phrasing content, labelable content,palpable content.
Permitted contentPhrasing content, but there must be no<progress> element among its descendants.
Tag omissionNone, both the starting and ending tag are mandatory.
Permitted parents Any element that acceptsphrasing content.
Implicit ARIA roleprogressbar
Permitted ARIA rolesNorole permitted
DOM interfaceHTMLProgressElement

Specifications

Specification
HTML
# the-progress-element

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp