HTML rows Attribute

HTML rows Attribute: This attribute defines the visible height of a text area in lines. And the size of a textarea can also be specified by the CSS height and width properties.

HTML rows Attribute

This attribute can be applied to <textarea>.

Syntax: <textarea rows=”number”>

Browser Support

This attribute is supported by the following browsers:

  • Chrome
  • Internet Explorer
  • safari
  • Firefox
  • Opera

Example: for <textarea> element

<!DOCTYPE html>
<html>
<body>
<textarea rows="4" cols="50">
At tutorials.freshersnow.com -Learn Tutorials
For Free. For Everyone. Forever.
</textarea>
</body>
</html>

Output:

At tutorials.freshersnow.com you will learn how to make a website. We offer free tutorials in all web development technologies.

This textarea has 4 visible rows.

You can change that by changing the value of the “rows” attribute.