HTML <textarea> cols attribute
Definition and Usage
cols
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
Specified text area with height and width:
<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 | Specifies 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 |