Home > Web Front-end > HTML Tutorial > meter tag_html/css_WEB-ITnose

meter tag_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:47
Original
1628 people have browsed it

meter

The

meter element tag is used to represent a scalar or fractional value with a known and measurable range, such as disk usage ratio, keyword matching degree, etc. It should be noted that meter cannot be used to represent any value that has no known range, such as weight and height, unless the range of their values ​​has been set. The meter element has a total of 6 attributes:

Value: Indicates the actual value of the current scalar; if not specified, the first number in the meter tag will be considered its current actual value, such as 2 out of "2" in 10; if there are no numbers in the label, the actual value of the scalar is 0.
Min: The minimum value of the current scalar; if not specified, it is 0.
Max: The maximum value of the current scalar; if not specified, it is 1; if the specified maximum value is less than the minimum value, then the minimum value will be considered the maximum value.
Low: The low value area of ​​the current scalar; must be less than or equal to the high value area number of the scalar; if the low value area number is less than the scalar minimum value, then it will be considered the minimum value.
High: The high value area of ​​the current scalar.
Optimum: the best value; its range is between the minimum value and the maximum value, and can be in the high value area.
Let’s look at some code examples; first, without setting any attributes:

<p>Your score is:  <meter>2 out of 10</meter></p>
Copy after login

Then, you can add maximum and minimum attribute settings:

<p>Your score is: <meter min="0" max="10">2 out of 10</meter></p>
Copy after login

Added attribute settings for low value area, high value area and optimal value:

<p>Your score is: <meter value="91" min="0" max="100" low="40" high="90" optimum="100">A+</meter></p>
Copy after login

At this time, the maximum value of meter will be considered as 100% or 1.

The following code can be used as a holiday countdown:

<p>Christmas is in <meter value ="30" min="1" max="366" title="days">30 days!</p>
Copy after login

The content in the meter tag does not need to contain any numbers, in which case the maximum value will be considered to be 1; you can refer to the following Code:

<p><meter value="0.5">Moderate activity,</meter> Usenet, 618 subscribers</p><p><meter value="0.25">Low activity,</meter> Usenet, 22 subscribers</p><p><meter value="0.25">Low activity,</meter> Usenet, 66 subscribers</p>
Copy after login

Concise version of HTML5 study notes (4): new elements video, audio, meter, datalist, keygen, output

HTML meter tag

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template