English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML: <textarea> rows attribute

The rows attribute specifies the visible height of the text area in rows. The size of textarea can also be specified through CSS height and width properties.

 HTML <textarea> tag

Online Example

Text area with specified height and width:

<textarea rows="5" cols="50" >
    Enter text here...
</textarea>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the rows attribute.

Definition and Usage

The rows attribute specifies the visible height of the text area in rows.
Note: The size of textarea can also be specified through CSS height and width properties.

HTML 4.01 with HTML5The difference

None.

Syntax

<textarea rows="number">

Attribute value

ValueDescription
numberSpecify the height of the text area (in rows). The default value is2
 HTML <textarea> tag