HTML CSS examples for HTML Tag:input
The maxlength attribute specifies the maximum number of characters allowed in the <input> element.
Value | Description |
---|---|
number | The maximum number of characters allowed in the <input> element. Default value is 524288 |
An <input> element with a maximum length of 10 characters:
<!DOCTYPE html> <html> <body> <form action="/action_page.php"> Username: <input type="text" name="usrname" maxlength="10"><br> <input type="submit" value="Submit"> </form><!-- ww w .ja v a2s.c o m--> </body> </html>