Easy Tutorial
❮ Av Event Pause Att Global Contenteditable ❯

HTML <input> max Attribute

HTML <input> Tag

Example

Using the min and max attributes:


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 <input> tag.

Note: Since Internet Explorer 10 does not support these input types, the max attribute will not apply to date and time in IE 10.


Definition and Usage

The max attribute specifies the maximum value for an <input> element.

Tip: The max attribute works 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 Numeric value. Specifies the maximum value allowed for the input field.
date Date. Specifies the maximum value allowed for the input field.

❮ Av Event Pause Att Global Contenteditable ❯