rows attribute on a <textarea> tag specifies the number of lines of text, i.e. rows, that are visible in the textarea.
rows attribute on a <textarea> element.
rows dictates the textarea height. A scrollbar appears because the content is larger than the number of rows allowed.
<textarea rows="5" cols="60"> Unlike most Dutch masters of the 17th century, Rembrandt's works depict a wide range of style and subject matter, from portraits and self-portraits to landscapes, genre scenes, allegorical and historical scenes, and biblical and mythological themes as well as animal studies. </textarea>
rows attribute specifies the height of the textarea, as expressed in number of lines.
If the content exceeds the number of lines, i.e. rows, a vertical scrollbar will appear.
The default value for
rows is 2.
Tip: A textarea's height and width can also be specified with CSS height and width properties.
|number||A number, e.g. 5.|
Here is when
rows support started for each browser:
Back to <textarea>