The maxLength attribute sets an upper limit on the number of characters that can be entered in an input element.
Applies to [html/elements/input](/html/elements/input)This attribute can be applied to inputs with the type [text](/html/elements/input/type/text), [search](/html/elements/input/type/search), [url](/html/elements/input/type/url), [email](/html/elements/input/type/email), [telephone](/html/elements/input/type/telephone), and [password](/html/elements/input/type/password).
ExamplesThe example text box has a max length of 12 characters.
<input maxLength="12">
See also Related articles HTML
maxLength
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4