Horje
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

Browser Support


How to add A text area with a specified height and width

The textarea rows and cols attributes.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The textarea rows and cols attributes</h1>

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

<p>This textarea has 4 visible rows.</p>
<p>You can change that by changing the value of the "rows" attribute.</p>

</body>
</html>

Output should be:

How to add A text area with a specified height and width




html cols attribute

Type:
Develop
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference