VOOZH about

URL: https://www.geeksforgeeks.org/html/html-max-attribute/

⇱ HTML max attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML max attribute

Last Updated : 12 Jul, 2025

In HTML max attribute it specifies the maximum value of an element. when the max attribute is used by the progress element, it specifies how much work the task requires in the total task. 

Syntax

<element max="value" >

Supported Tags:

The max attribute is used on the following elements:

Name

Description

input max

Maximum value or limit for a parameter or variable.

meter max

The highest possible measurement value on a metering device.

progress max

The maximum level of advancement or completion reached in a process.

HTML max attribute Examples

Example: In this example we demonstrates the use of the max attribute in an input field, limiting the input to multiples of 5 up to a maximum value of 100.

Output:

👁 maxAttribute
HTML max attribute Example Output

Example 2: This Example we are using the max attribute within the <progress> tag to indicate a maximum value of 100 for a song download progress bar.

Output:

👁 maxAttribute
HTML max attribute example output


Supported Browsers: The browser supported by HTML max Attribute are listed below:

Comment
Article Tags: