Definition and Usage The size attribute specifies the length (in number of characters) of "text" or "password" fields. ...
Definition and Usage
The size attribute specifies the length (in number of characters) of "text" or "password" fields.
Compatibility Notes
Since this is a purely visual design attribute, it is recommended to use CSS styles instead.
CSS syntax: <input style="width:100px" />
Syntax
<input size="char_length" /> |
Syntax Example
Attribute Values
Value | Description |
char_length | Specifies the length of the input element. The length is specified in number of characters. |
Browser Support
The attribute is supported in all major browsers.
Example
<form action="">
<input type="text" name="demo" size="10" />
</form> |