splitforms.com

HTML · ELEMENT

HTML meter Element: Gauges, Colour Zones and Password Strength

Last reviewed

The <meter> element is a gauge: it shows a measurement inside a known range, such as disk usage, a quiz score or password strength. `value` is required and sits between `min` and `max` (default `0` and `1`). Add `low`, `high` and `optimum` and the browser colours the bar green, yellow or red depending on how close the value is to the best zone. The text inside the tag is fallback content for browsers that cannot draw the gauge.

  • Live, editable example
  • Copy-paste snippet
  • Attributes & common mistakes
Live demo · nothing is sent

What gets submitted

Fill in the form above and press its button. The demo stops the request and lists every name=value pair the browser would send, plus the controls it leaves out.

With a free access key in the form, these fields land in your splitforms dashboard; access_key and botcheck are read by splitforms, not stored as lead data.

Edit the HTML and re-run it
Runs in a sandbox. Nothing is sent.

Minimal snippet

meter-example.html
<label for="disk">Disk usage</label>
<meter id="disk" value="0.72" low="0.6" high="0.9" optimum="0.2">72%</meter>

Copy-paste code

HTML Meter Element code you can paste today.

Replace YOUR_ACCESS_KEY with a key from your free splitforms dashboard. The form posts to one endpoint — submissions land in your inbox and dashboard with spam filtering built in.

Get free access key
meter.html
<form id="signup" action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">

  <label for="email">Email</label>
  <input type="email" id="email" name="email" required>

  <label for="password">Password</label>
  <input type="password" id="password" name="password"
         minlength="8" autocomplete="new-password" required
         aria-describedby="strength-text">

  <label for="strength">Password strength</label>
  <meter id="strength" min="0" max="4" low="2" high="3" optimum="4" value="0">0 of 4</meter>
  <span id="strength-text" aria-live="polite">Too weak</span>

  <button type="submit">Create account</button>
</form>

<script>
  const password = document.getElementById("password");
  const meter = document.getElementById("strength");
  const text = document.getElementById("strength-text");
  const labels = ["Too weak", "Weak", "Fair", "Good", "Strong"];

  // One point per rule: length >= 8, a digit, an upper-case letter, a symbol
  function score(pw) {
    let s = 0;
    if (pw.length >= 8) s++;
    if (/\d/.test(pw)) s++;
    if (/[A-Z]/.test(pw)) s++;
    if (/[^A-Za-z0-9]/.test(pw)) s++;
    return s;
  }

  password.addEventListener("input", () => {
    const s = score(password.value);
    meter.value = s;          // 0-1 red, 2-3 yellow, 4 green
    meter.textContent = s + " of 4";
    text.textContent = labels[s];
  });
  // The meter has no name, so only email and password are sent
</script>

Colour zones

How do low, high and optimum colour the meter?

low and high split the range into three zones: below low, between low and high, and above high. optimum says which zone is best. A value in the same zone as optimum is drawn green, a value one zone away is yellow, and a value two zones away is red. Leave optimum out and it defaults to the middle of the range.

How do low, high and optimum colour the meter?
Where optimum isValue below lowValue between low and highValue above high
Above high (higher is better, e.g. password strength)RedYellowGreen
Between low and high (middle is best, e.g. temperature)YellowGreenYellow
Below low (lower is better, e.g. disk usage)GreenYellowRed

Sources: WHATWG HTML Standard: The meter element

Comparison

What is the difference between meter and progress?

Use <meter> for a **measurement** inside a known range: disk usage, a score, password strength, battery level. Use <progress> for how far a **task** has got: an upload, a download, step 2 of 4. A meter always shows a value and has colour zones; a progress bar can be indeterminate but has no zones.

What is the difference between meter and progress?
Topic<meter><progress>
MeaningA scalar value in a known rangeCompletion of a task
ExamplesDisk usage, password strength, quiz scoreFile upload, form step 3 of 5, install progress
Attributesvalue, min, max, low, high, optimumvalue, max
Colour zonesYes, from low/high/optimumNo
Indeterminate stateNo: it always shows a valueYes: leave out value
Implicit ARIA rolemeterprogressbar
Submitted with the formNoNo

Sources: WHATWG HTML Standard: The meter element · WHATWG HTML Standard: The progress element

Attributes · <meter>

Which attributes does the meter element support?

value (required), min and max for the range, and low, high and optimum for the colour zones. Global attributes such as id and aria-label also apply.

HTML Meter Element attributes and what each one does
AttributeWhat it doesDocs
valueRequired. The current measurement. Values below min or above max are clamped to the range. In JavaScript, meter.value reads and sets it as a number.MDN
minThe lower end of the range. Defaults to 0.MDN
maxThe upper end of the range. Defaults to 1, so value="0.5" alone draws a half-full gauge.MDN
lowThe top of the low zone. Must be at least min; values below it are in the low zone.MDN
highThe bottom of the high zone. Must be at most max and not less than low; values above it are in the high zone.MDN
optimumThe best value. The zone it falls in is drawn green, and values further away turn yellow, then red. Defaults to the middle of the range.MDN

Common mistakes

HTML meter mistakes to avoid

Using it for task progress, forgetting optimum, and expecting its value in the form data.

  1. It is not sent with the form

    <meter> has no name and is not a submittable element, so its value never appears in the POST body. If the server needs the score, copy it into a hidden <input>.

  2. Without optimum the colours look wrong

    optimum defaults to the middle of the range, so a full password-strength meter can show yellow instead of green. Set optimum to max when higher is better, or to min when lower is better.

  3. Don't use it for task progress

    Uploads, downloads and multi-step forms are tasks. Use [<progress>](/html/progress) for those; <meter> has no indeterminate state and tells assistive tech it is a gauge.

  4. Give it an accessible name

    The element has the implicit role meter, so you don't need role="meter" yourself. Name it with <label for> pointing at its id, or with aria-label. Screen readers may only read the number, so add visible text such as "Strong" next to it and link it to the input with aria-describedby.

  5. Colour alone is not enough

    Green, yellow and red are hard to tell apart for many people. Pair the gauge with a word or number so the meaning does not depend on colour.

Sources: WHATWG HTML Standard: The meter element · MDN: <meter> · WAI-ARIA 1.2: meter role

Copy-paste ready

The HTML Meter Element example below is a complete, working form — paste it into any HTML page and it submits, no edits to the markup required.

No backend to build

Your html meter element form posts to one endpoint. No server, PHP, or API route — accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

A form that really submits

Unlike a static reference snippet, this <meter> form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML Meter Element to any page.

Copy the html meter element example, drop in your free access key, and paste it into any page — submissions start landing in your dashboard.

Copy the code

Copy the HTML Meter Element example below.

Add your access key

Replace YOUR_ACCESS_KEY with a free splitforms key from the dashboard.

Paste into your site

Drop the form into any HTML page. Submissions arrive in your dashboard.

How SplitForms works

What happens after someone submits your form?

splitforms receives the submission, filters spam, saves it to your dashboard and emails you — then, on paid plans, sends it on to your webhooks and integrations. No backend infrastructure to build.

A SplitForms contact form submission launching straight to your inbox

Add your endpoint

Point your form to your unique SplitForms endpoint. That's it.

HTML form pointing at a SplitForms submit endpoint

Receive submissions

We instantly capture and organize every submission in your inbox.

Submissions inbox with searchable leads and status pills

Route anywhere

Send data to email, spreadsheets, CRMs, webhooks, and 7,000+ apps.

Generic integration tiles for email, sheets, chat, CRM, automate, and webhook

No credit card required. Set up in under 60 seconds.

Connect & automate

Where can submissions go besides email?

On paid plans, submissions can also go to Slack, Discord, Google Sheets, Notion, Airtable, Zapier or any signed webhook — and splitforms works on the platforms you build on, from WordPress and Shopify to Next.js. With Stripe connected, your forms can take payments too.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more
NewTake payments on your formsDeposits, bookings, order forms — submitters check out through Stripe and the money goes straight to your Stripe account. Included on every paid plan.See payment forms →Need time slots? Online booking →

Setup guides for the stacks you use

Questions

HTML Meter Element questions, answered.

View all FAQs
What is the meter tag used for in HTML?

It shows a scalar measurement inside a known range, like disk usage, a test score, battery level or password strength. Set value, and min and max if the range is not 0 to 1. It is a display element only.

How do I change the colour of an HTML meter?

Set low, high and optimum. The browser draws the bar green when the value is in the same zone as optimum, yellow one zone away and red two zones away. For custom colours, use appearance: none and the vendor pseudo-elements ::-webkit-meter-optimum-value, ::-webkit-meter-suboptimum-value, ::-webkit-meter-even-less-good-value and ::-moz-meter-bar.

How do I make a password strength meter in HTML?

Put <meter min="0" max="4" low="2" high="3" optimum="4"> after a password input, then on the input event give one point each for length 8 or more, a digit, an upper-case letter and a symbol, and set meter.value to the total. Add a text label next to it for screen readers.

Is the meter value submitted with the form?

No. A meter has no name attribute and is not a submittable form control, so it is never sent. Copy the value into a hidden input if the server needs it.

Should I use meter or progress?

Use <meter> for a measurement in a range, such as storage used or password strength. Use <progress> for how far a task has got, such as an upload or step 2 of 4.

Simple pricing

How much does splitforms cost?

Free gives you 500 submissions for $0 — no card, no time limit. Pro is $5/month for 5,000 submissions a month, and Annual is $49/year for 15,000 a month with every Pro feature.

Free

$0— 500 submissions
 

No card, no time limit

Best for testing

For side projects and indie devs.

  • 500 free submissions
  • Unlimited forms
  • Email notifications included
  • Smart spam filtering
  • Submissions dashboard
  • Redirect after submit
  • MCP server included

Annual

$49/ year
About $4.08 per month, billed yearly
Best value

Every Pro feature with triple the volume — $0.27 per 1,000 at full use.

  • 15,000 submissions per month
  • Unlimited forms
  • Everything in Pro
  • File uploads with 5 GB storage
  • 3 team seats
  • Priority email support

No credit card required on Free • Cancel anytime • Full pricing and FAQ