HTML max property
Example
Using the min and max attributes:
Try it »
Browser support





Internet Explorer 10, Opera, Chrome, and Safari support the max attribute.
**Note:** Firefox or Internet Explorer 9 and earlier versions do not support the max attribute of the tag.
**Note:** Since Internet Explorer 10 does not support these input types, the max attribute will not work with date and time in IE 10.
Definition and Usage
The max attribute specifies the maximum value of the element.
**Tip:** The max attribute is used together with the min attribute to create a range of legal values.
**Note:** The max and min attributes apply to the following input types: number, range, date, datetime, datetime-local, month, time, and week.
Differences between HTML 4.01 and HTML5
The max attribute is new in HTML5.
Syntax
Attribute values
| Value | Description |
|---|---|
| number | A number. Specifies the maximum value allowed in the input field. |
| date | A date. Specifies the maximum value allowed in the input field. |
HTML tag