HTML <textarea> cols attribute
Definition and usage
cols
The attribute specifies the visible width of the text area.
Tip:The size of the text area can also be specified through CSS height and width Attribute settings.
Example
Specify the height and width of the text area:
<textarea rows="4" cols="50"> At codew3c.com, you will learn how to develop websites. We provide free tutorials for all Web development technologies. </textarea>
Syntax
<textarea cols="number">
Attribute value
Value | Description |
---|---|
number | Specify the width of the text area (in average character width units). The default value is 20. |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |