The <progress>
displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
Content categories | Flow content, phrasing content, labelable content, palpable content. |
---|---|
Permitted content |
Phrasing content, but there must be no <progress> element among its descendants. |
Tag omission | None, both the starting and ending tag are mandatory. |
Permitted parents | Any element that accepts phrasing content. |
Permitted ARIA roles | None |
DOM interface | HTMLProgressElement |
This element includes the global attributes.
max
progress
element requires. The max
attribute, if present, must have a value greater than zero and be a valid floating point number. The default value is 1.value
max
, or between 0 and 1 if max
is omitted. If there is no value
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: The minimum value is always 0 and the min
attribute is not allowed for the progress element. You can use the -moz-orient
CSS property to specify whether the progress bar should be rendered horizontally (the default) or vertically.
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 with element.removeAttribute("value")
<progress value="70" max="100">70 %</progress>
On Windows 7, the resulting progress looks like this:
See -moz-orient
.
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of '<progress>' in that specification. | Living Standard | |
HTML5 The definition of '<progress>' in that specification. | Recommendation | Initial definition |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 6 | Yes | 6
|
10 | 11 | 6 |
max |
6 | Yes | 6 | 10 | 11 | 6 |
value |
6 | Yes | 6 | 10 | 11 | 6 |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | Yes | 6
|
11 | 7
|
Yes |
max |
Yes | Yes | Yes | 6 | 11 | 7 | Yes |
value |
Yes | Yes | Yes | 6 | 11 | 7 | Yes |
:indeterminate
-moz-orient
::-moz-progress-bar
::-ms-fill
::-webkit-progress-bar
::-webkit-progress-value
::-webkit-progress-inner-element
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress