HTML <input> Tag with the 'size' Attribute

<form name="myForm" action="">
<input name="myInput" size="5">



The above example demonstrates usage of the <input> element with the size attribute.

The size attribute allows you to specify how many characters the user should be able to see when interacting with the input control.

When using the size attribute, you must use a valid non-negative integer greater than zero.

Note that you can override the size attribute with the CSS width property.