HTML <meter>タグ


メーター要素を使用して、特定の範囲(ゲージ)内のデータを測定します。

<label for="disk_c">Disk usage C:</label>
<meter id="disk_c" value="2" min="0" max="10">2 out of 10</meter><br>

<label for="disk_d">Disk usage D:</label>
<meter id="disk_d" value="0.6">60%</meter>

定義と使用法

<meter>タグは、既知の範囲内のスカラー測定値または分数値を定義しますこれはゲージとも呼ばれます。

例:ディスク使用量、クエリ結果の関連性など。

注:この<meter>タグは、進行状況を示すために使用しないでください(進行状況バーのように)。プログレスバーには、<progress>タグを使用します。

ヒント:アクセシビリティのベストプラクティスとして、常に<label>タグを追加してください。


ブラウザのサポート

表の数字は、要素を完全にサポートする最初のブラウザバージョンを示しています。

Element
<meter> 8.0 13.0 16.0 6.0 11.5


属性

Attribute Value Description
form form_id Specifies which form the <meter> element belongs to
high number Specifies the range that is considered to be a high value
low number Specifies the range that is considered to be a low value
max number Specifies the maximum value of the range
min number Specifies the minimum value of the range. Default value is 0
optimum number Specifies what value is the optimal value for the gauge
value number Required. Specifies the current value of the gauge

グローバル属性

この<meter>タグは、HTMLのグローバル属性もサポートしています。


イベント属性

この<meter>タグは、HTMLのイベント属性もサポートしています。


関連ページ

HTML DOMリファレンス:メーターオブジェクト


デフォルトのCSS設定

なし。