HTML <textarea> rowsAttribute

HTML textarea 标签参考手册HTML <textarea> Tag

Examples

A text area with a specified height and width:

<textarea rows="4" cols="50">
On example.com you will learn how to build a website. We provide all free Web development tutorials.
</textarea>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the rows attribute.


Definition and Usage

The rows attribute specifies the visible height of a text area, in lines.

Note:The size of a textarea can also be set with the CSS height and width properties.


Differences Between HTML 4.01 and HTML5

None.


Syntax

<textarea rows="number">

Attribute Values

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


HTML textarea 标签参考手册HTML <textarea> Tag Other Extensions