Create an HTML <meter> Element Online

The HTML Meter Generator creates a <meter> element for a scalar measurement within a known range, such as disk usage or a score. Set the range, current value, low and high thresholds, and optimum value; all outputs update together.

The generator keeps min < max, places low, high, optimum, and value within the range, and keeps low ≤ high. Use the HTML Progress Generator for task completion rather than a measurement.



Create an HTML <meter> Element in C#

The C# panel shows how to create the configured meter with Aspose.HTML for .NET . The generated code follows this workflow:

  1. Create an HTMLDocument .
  2. Create the meter element with CreateElement() .
  3. Set its range, thresholds, optimum, current value, and fallback text with SetAttribute() and TextContent .
  4. Add the meter with AppendChild() and write meter.html with Save() .

Configure the measurement range before copying the updated C# code.


HTML Meter Generator FAQ

1. When should I use <meter> instead of <progress>?

Use <meter> for a scalar measurement within a known range, such as storage usage or a rating. Use <progress> to show how much of a task has been completed.

2. What do low and high mean on a meter?

They mark thresholds inside the min–max range. Together with optimum, they let the browser distinguish whether the current value lies in a preferred, suboptimal, or poor region.

3. What does the optimum attribute do?

It identifies the value considered best. Its position relative to low and high tells the browser whether lower, middle, or higher values are preferred; it does not change the meter’s current value.

4. Why can the generated meter look different across browsers?

The HTML attributes define the measurement and thresholds, while each browser and operating system supplies the native presentation. Use CSS when a project requires additional visual consistency.

5. Why does the generated <meter> contain text?

Text inside <meter> provides a readable fallback when the element is not rendered as a gauge. The numeric value, min, and max attributes remain the machine-readable measurement.


Get Started with Aspose.HTML for .NET API

Install Aspose.HTML for .NET from NuGet with the .NET CLI:

dotnet add package Aspose.HTML

You can also use the NuGet Package Manager UI or run Install-Package Aspose.HTML in the Package Manager Console. See the installation guide for setup details, or request a temporary license to evaluate the API without evaluation limitations.