THE GITHTML FIELD GUIDE

Choose meter or progress for a report value

Use meter for a measurement within a known range and progress for completion of a task. Always print the value and its meaning in ordinary text. A saved report cannot establish that work is still progressing, so include the observation time and avoid animated indicators that imply a live connection.

Choose the right representation

A capacity gauge and a task-completion bar may look similar while answering different questions. Capacity describes a bounded quantity; completion describes how far work has advanced. Choosing by appearance alone can misrepresent the value. A historical snapshot should say that it records an earlier observation.

Apply the pattern deliberately

Put the unit, denominator, and date next to the control. Explain whether a larger value is desirable rather than relying on native colors. The text should remain sufficient when the browser styles the indicator differently or a reader cannot perceive the bar.

  1. Identify whether the quantity is a measurement or task completion before selecting markup.
  2. Write the numeric value, unit, and observation time outside the visual indicator.
  3. Check how unknown and out-of-range values are represented before sharing the report.
html
<label for="capacity">Storage used: 60 of 100 GB</label>
<meter id="capacity" min="0" max="100" value="60">60%</meter>

Handle unknown and historical values honestly

A storage report saying sixty of one hundred gigabytes used describes a bounded measurement. A conversion job saying sixty of one hundred files processed describes completion. The same percentage does not make the concepts interchangeable. Write the sentence first, then choose the element that matches it. If the quantity has no meaningful maximum, do not invent one simply to get a progress-bar appearance; a labeled number or a different chart may be more appropriate.

An unavailable observation needs a separate text state. Omitting or corrupting a meter value can produce a zero-like result instead of communicating unknown data. Do not let a browser default decide what the report claims. Validate the value and range while generating the HTML, and print an explanatory unavailable label when the observation is missing. If a value exceeds the expected range, investigate the unit, denominator, and source before silently clipping it into an attractive display.

A progress element without a value can represent indeterminate progress, but that visual treatment is usually misleading in an archived report. A saved file is not proof that a job is still running now. Record the observed status and time, and link to an authorized live status page only if readers need the current state. For a completed snapshot, distinguish successful completion from a stopped or failed job; a full-looking bar should not substitute for an explicit outcome sentence.

Check the finished reading experience

Test the endpoints and an unknown value. An unavailable measurement must not silently become zero, and a completed task should not continue to look active.

Sources and further reading

AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.

All reading html on your phone guides →

Read as MarkdownAll guides

Choose meter or progress for a report value · gitHtml