- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML min Attribute
The min attribute of the <meter> element is used to set the lower bound for <meter>. However, the <meter> element is used to measure data with a give range like water impurity level and it is set using the min and max attribute.
Syntax
For obvious reasons, the min value is less than the max value. The default is 0. Following is the syntax −
<meter min="num">
The num above is a number in floating-point that sets the min attribute of the <meter> element.
Example
Let us now see an example to implement the min attribute of the <meter> element −
<!DOCTYPE html> <html> <body> <h2>Water Levels</h2> <p>Impurity Level <meter min="0" low="50" high="95" max="100" value="85"></meter></p> <p>TDS Level <meter min="0" low="20" high="80" max="100" value="60"></meter></p> </body> </html>
Output
This will produce the following output −
In the above example, we have displayed meter for water levels using the <meter>. For minimum value of the meter, we have used the min attribute −
<meter min="0" low="50" high="95" max="100" value="85"></meter>
Advertisements