HTML5 Meter Example



The <meter> element should be used as a gauge. Note that not all browsers support this element. In this example, I am using PHP to calculate the available free space on this domain and displaying the result using the <meter> element.

View the source code of this page to better understand how this element is used. Don't forget to try this page in multiple browsers. Works best in Chrome and Opera. You should see a bar around 20% below.

Example <meter>

Free Disk Space (%):

In this example, I use a little PHP to calculate the available free space in this domain against the total amount of disk space available. I report this as a range from 0 to 1. In the browser supports the <meter> element, one would see a graphical indicator above.