Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

HTML cols Attribute


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.


Applies to

The cols attribute can be used on the following element:

Elements Attribute
<textarea> cols

Example

Textarea 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 »

Browser Support

Attribute
cols Yes Yes Yes Yes Yes