Tutorials References Exercises Videos Menu
Free Website Get Certified Pro

HTML <textarea> cols Attribute

❮ HTML <textarea> tag

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 text area can also be set by the CSS height and width properties.


Browser Support

Attribute
cols Yes Yes Yes Yes Yes

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