HTML <textarea> cols Attribute
Example
A text area with a specified height and width:
<textarea rows="4" cols="50">
At w3schools.com you will learn how to make a website. We offer free
tutorials in all web development technologies.
</textarea>
Try it yourself »
Definition and Usage
The cols attribute specifies the visible width of a text area.
Tip: The size of a textarea can also be set by the CSS height and width properties.
Browser Support
Attribute | |||||
---|---|---|---|---|---|
cols | Yes | Yes | Yes | Yes | Yes |
Differences Between HTML 4.01 and HTML5
NONE.
Syntax
<textarea cols="number">
Attribute Values
Value | Description |
---|---|
number | Specifies the width of the text area (in average character width). Default value is 20 |
HTML <textarea> tag