HTML <meter> form attribute

Definition and Usage

form Attribute that specifies the form to which the <meter> tag belongs.

The value of this attribute must be equal to the The <form> element The id attribute of this element.

Example

The <meter> element outside the form (but still part of the form):

<form action="/action_page.php" method="get" id="form1">
  First name: <input type="text" name="fname"><br>
  <input type="submit" value="Submit">
</form>
<p><label for="anna">Xiao Ming's Score:</label>
<meter id="anna" form="form1" name="anna" min="0" low="40" high="90" max="100" value="95"></meter></p>

Try It Yourself

Syntax

<meter form="form_id">

Attribute Value

Value Description
form_id

Specifies the form element to which the <meter> element belongs.

The value of this attribute must be the id attribute of the <form> element in the same document.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Not Supported Not Supported Not Supported Not Supported Not Supported