CKTIS / HTML
progress — task completion progress
The `progress` element represents task completion: determinate through `value` and `max`, or indeterminate when `value` is absent. It is not intended for ordinary measurements.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<progress value="25" max="100">25 / 100</progress>
<progress></progress>progress describes task completion, not a general measurement; use meter for disk usage. Both opening and closing tags are required. It accepts phrasing content, but cannot contain another progress.
value specifies completed work, and max the total. Both attributes accept floating-point numbers: max must be positive, and value must lie between 0 and max. The default maximum is 1. Missing or invalid max produces a maximum of 1; invalid or negative value is read as 0, and an excessive value is capped at the maximum.
An absent value means indeterminate progress; value="0" means a known zero. Remove the attribute with removeAttribute('value') to return to indeterminate progress. On HTMLProgressElement, read-only position returns value / max, or -1 when indeterminate; in that state, the value property returns 0.
Associate a label through for and id, as shown. Inner text provides fallback content for older browsers, but does not establish the value. The example finishes with a full bar and records successive states as text.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Progress example</title>
<label for="task">Task</label>
<progress id="task" value="25" max="100">25 / 100</progress>
<pre id="result"></pre>
<script>
const task = document.getElementById('task');
const lines = [String(task.position)];
task.removeAttribute('value');
lines.push(String(task.position));
task.value = 100;
task.textContent = '100 / 100';
lines.push(String(task.position));
document.getElementById('result').textContent = lines.join('\n');
</script>
</html>Result
0.25 -1 1
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.