W3Schools.com

HTML <textarea> cols Attribute

HTML textarea Tag Reference HTML <textarea> tag

Example

A text area with 3 lines and a width of 25 characters:

<textarea rows="3" cols="25">
At W3Schools you will find all the Web-building tutorials you need, from basic HTML to advanced XML, SQL, ASP, and PHP.
</textarea>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The cols attribute is supported in all major browsers.


Definition and Usage

The cols attribute specifies the visible width of a text area.


Syntax

<textarea cols="number">

Attribute Values

Value Description
number Sets the width of the text area (in average character widths). Default value is 20


HTML textarea Tag Reference HTML <textarea> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE