HTML <meter> form Attribute

The form attribute on a <meter> tag specifies the form the meter is associated with.

Example

#

A form attribute on a <meter> element.
The meter is outside the form, but associated with it.

Project Information


Project completion: 80%
90%
<form action="/tutorial/action.html" id="project-form">
 <fieldset>
  <legend>Project Information</legend>
  <input type="text" name="name" placeholder="Project name"><br /><br />

  <input type="submit" value="Submit">
 </fieldset>
</form> <br />

<div>Project completion: 80%</div>
<meter form="project-form" 
       value="0.8" name="completion">90%</meter>

Note:  The meter value is not submitted during form submission.


Using form

The form attribute specifies the form the meter is associated with.

The attribute value is the id of the form.

The meter value is not included during form submission.


Syntax

<meter form="form-id">

Values

#

Value Description
form-id The id value of the form.

Browser support

Here is when form support started for each browser:

Chrome
Not Supported
Firefox
Not Supported
IE/Edge
Not Supported
Opera
Not Supported
Safari
Not Supported

You may also like

 Back to <meter>
Guides