Advertisement
Home Open Editor ❯

HTML rows Attribute

Example

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

Try this code ❯

Meaning

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


Applies to:

The rows attribute can be used on the following element:

Element Attribute
<textarea> rows

Advertisement

Attribute Values

Value Description
number Specifies the number of lines to show. by defult is 2.
Home Open Editor ❯
Advertisement