maxlength="4" input code example Example: html input max vs maxlength <input type="text" maxlength="4"/>