HTML rows Attribute

❮ HTML Attributes


<form action="action.php">
	<label for="demo">textarea demo:</label>
	<textarea rows="5" id="demo" name="textareaText">Hello world!</textarea>
	<input type="submit" value="Submit">


The rows attribute specifies the number of rows in the text area. The value of the attribute should be a positive integer.

Standard Syntax

<element rows="number">

Browser Support


Applies to:

The rows attribute can be used on the following element:

Element Attribute
<textarea> rows

Attribute Values

Value Description
number Specifies the number of lines to show. by defult is 2.
❮ HTML Attributes