HTML textarea cols Attribute

HTML <textarea> tag : A text area with a specified height and width

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