Latest

recent

HTML Input size Attribute

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

<input size="10" />

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>
HTML Input size Attribute Reviewed by 1000sourcecodes on 04:04 Rating: 5
Powered by Blogger.