Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

Attribute “maxlength” is only allowed when the input type is “email”, “password”, “search”, “tel”, “text”, or “url”.

The maxlength attribute can be used on an input element to define a client-side validation for the maximum length allowed on an input without resorting to JavaScript.

This attribute is only allowed on elements of type email, password, search, tel, text, or url.

Related W3C validator issues