Horje
HTML max Attribute

Definition and Usage

The max attribute specifies the maximum value of the element.

When used by the <progress> element, the max attribute specifies how much work the task requires in total.


Applies to

The max attribute can be used on the following elements:

Elements Attribute
<input> max
<meter> max
<progress> max

Browser Support

The max attribute has the following browser support for each element.


How to Use of the min and max attributes

Input Example.
index.html
Example: HTML
<form action="/action_page.php">
  <label for="datemax">Enter a date before 1980-01-01:</label>
  <input type="date" id="datemax" name="datemax" max="1979-12-31"><br><br>

  <label for="datemin">Enter a date after 2000-01-01:</label>
  <input type="date" id="datemin" name="datemin" min="2000-01-02"><br><br>

  <label for="quantity">Quantity (between 1 and 5):</label>
  <input type="number" id="quantity" name="quantity" min="1" max="5"><br><br>

  <input type="submit">
</form>

Output should be:

How to Use of the min and max attributes

How to add A gauge with a current value and min, max, high, and low segments - HTML max Attribute

Meter Example.
index.html
Example: HTML
 <meter min="0" low="40" high="90" max="100" value="95"></meter> 

Output should be:

How to add A gauge with a current value and min, max, high, and low segments - HTML max Attribute

How to add Downloading in progress

Progress Example.
index.html
Example: HTML
 <progress value="22" max="100"></progress> 

Output should be:

How to add Downloading in progress




html max attribute

Type:
Develop
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference