Tag HTML <metro>
Esempio
Utilizzare l'elemento metro per misurare i dati all'interno di un determinato intervallo (un indicatore):
<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>
Definizione e utilizzo
Il <meter>
tag definisce una misura scalare all'interno di un intervallo noto o un valore frazionario. Questo è anche noto come indicatore.
Esempi: utilizzo del disco, pertinenza del risultato di una query, ecc.
Nota: il <meter>
tag non deve essere utilizzato per indicare l'avanzamento (come in una barra di avanzamento). Per le barre di avanzamento, utilizza il tag <progress> .
Suggerimento: aggiungi sempre il tag <label> per le migliori pratiche di accessibilità!
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente l'elemento.
Element | |||||
---|---|---|---|---|---|
<meter> | 8.0 | 13.0 | 16.0 | 6.0 | 11.5 |
Attributi
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 |
Attributi globali
Il <meter>
tag supporta anche gli attributi globali in HTML .
Attributi dell'evento
Il <meter>
tag supporta anche gli attributi dell'evento in HTML .
Pagine correlate
Riferimento HTML DOM: Oggetto Meter
Impostazioni CSS predefinite
Nessuno.