- HTML Tutorial
- HTML - Home
- HTML - History and Evolution
- HTML - Overview
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Headings
- HTML - Paragraphs
- HTML - Quotations
- HTML - Comments
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Style Sheet
- HTML - CSS Classes
- HTML - CSS IDs
- HTML - Images
- HTML - Image Map
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Iframes
- HTML - Blocks
- HTML Backgrounds
- HTML - Backgrounds
- HTML Colors
- HTML - Colors
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Code Builder
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - high Attribute
The HTML high attribute is used to specify the lower bound of an upper range. It is the lower numerical bound of the higher end of the measured range.
This attribute value must be less than the maximum value (max attribute) and also greater than the min and low values (min attribute, low attribute). If it is not specified within the meter element or its value is greater than the max value (max attribute), then the high attribute value will be equal to the max value.
Syntax
Following is the syntax of high attribute −
<meter high= "value"></meter>
Example
In the following example, we are using the high attribute with the meter tag.
<!DOCTYPE html> <html lang="en"> <head> <title>HTML 'high' attribute</title> </head> <body> <!--HTML 'high' attribute--> <p>Example of the HTML 'high' attribute</p> <label>Grade O</label> <meter high="90" max="100" value="95"></meter> <br> <label for="">Grade A+</label> <meter high="80" max="100" value="83"></meter> <br> <label for="">Grade A</label> <meter high="70" max="100" value="72"></meter> <br> <label for="">Grade E</label> <meter high="30" max="100" , value="35"></meter> <p>Students who get more than 90 marks are considered as grade O.</p> <p>Students who get marks between 80 to 90 are considered as grade A+.</p> <p>Students who get marks between 70 to 80 are considered as grade A.</p> <p>Students who get marks below 40 consider failures.</p> </body> </html>
On running the above code, the output window will pop up displaying the text along with the meter reading on the webpage.
Example
Considering the another scenario, where we are going to run the script the along with the high attribute.
<!DOCTYPE html> <html lang="en"> <head> <title>HTML 'high' attribute</title> </head> <body> <!--HTML 'high' attribute--> <p>Example of the HTML 'high' attribute</p> <fieldset> <legend>Meter-high</legend> <label for="">Rahul's health</label> <meter high="80" low="65" min="0" max="100" value="90" id='rahul'></meter> <br> <br> <span id='res'>Your health is very week..</span> <br> <br> <button onclick="Increase()">Apply Health Kit</button> <p>Click on the above button to increase your immunity..</p> </fieldset> <script> function Increase() { var h = document.getElementById('rahul'); var immu = h.high; h.high = 90; var res = document.getElementById('res'); res.innerHTML = "Your immunity has increased from " + immu + " to " + h.high; } </script> </body> </html>
When we execute the script, it will generate an output consisting of the meter reading along witha click button on the webpage. when the user clicks the button the event gets triggered and changes the meter reading.
To Continue Learning Please Login
Login with Google