W3Schools.com

HTML <textarea> rows Attribute

HTML textarea Tag Reference HTML <textarea> tag

Example

A text area with 3 lines and a width of 25 characters:

<textarea rows="3" cols="25">
At W3Schools you will find all the Web-building tutorials you need, from basic HTML to advanced XML, SQL, ASP, and PHP.
</textarea>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The rows attribute is supported in all major browsers.


Definition and Usage

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


Syntax

<textarea rows="number">

Attribute Values

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


HTML textarea Tag Reference HTML <textarea> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE