HTML <textarea> rows attribute

Definition and usage

rows Attribute specifies the visible height of the text area in lines.

Note:The size of the textarea can also be specified through CSS height and width Attribute specifies.

Example

Text area with set height and width:

<textarea rows="4" cols="50">
At codew3c.com, you will learn how to develop websites. We provide free tutorials for all Web development technologies.
</textarea>

Try it yourself

Syntax

<textarea rows="number">

Attribute value

Value Description
number Specify the height of the text area (in lines). The default value is 2.

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support