English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The cols attribute specifies the visible width of the text area. The size of textarea can also be set through CSS height and width properties.
Specify both the height and width of textarea at the same time:
Example4<textarea rows="5" cols=" 0">3At w </textarea>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the cols attribute.
The cols attribute specifies the visible width of the text area.
Note:The size of the textarea can also be set using the CSS height and width properties.
None.
<textarea cols="number">
Value | Description |
---|---|
number | Specify the width of the text area (in average character width units). The default value is20. |