size attribute (input, isindex, ...)
Specifies the width of a control, in characters.
The width is calculated by the average character widths. You can set the dimensions of the input field by the width and the height style properties.
JavaScript page for this attribute: size. You can find other example(s) there. |
Possible values:
Integer that sets the width of the control, in characters. The default is 20.
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the size attribute:
|
||||
Input field with size=20: <br /> <input id="myInput" type="text" size="20" /> <br /><br /><br /> Input field with size=30: <br /> <input id="myInput" type="text" size="30" /> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, isIndex
Related pages:
External links:
User Contributed Comments