html tutorial - rows Attribute in HTML - html5 - html code - html form

Learn html - html tutorial - Rows attribute in html - html examples - html programs
- The rows attribute is used to specify the height of the textarea in no of lines.
Syntax for rows attribute in HTML:
<textarea rows="number">
Applies To:
Elements | Attribute |
---|---|
<textarea> | rows |
rows Attribute Values:
Value | Description |
---|---|
number | To specify the number of rows for the <textarea> |
Sample Coding for rows Attribute in HTML:
Tryit<!DOCTYPE html>
<html>
<head>
<title>Wikitechy rows attribute</title>
</head>
<body>
<textarea cols ="100">
Learn to Code in Wikitechy. Teach people how to different technologies
by way of clear and organized lessons. The guide covers a variety of topics,
ranging from beginner to advanced skill levels.
</textarea><br><br>
<textarea cols ="100" rows ="3">
Learn to Code in Wikitechy. Teach people how to different technologies
by way of clear and organized lessons. The guide covers a variety of topics,
ranging from beginner to advanced skill levels.
</textarea>
</body>
</html>
Code Explanation for rows Attribute in HTML:

- rows attribute used to specifies that the no of line to visible in the textarea.
Output for rows Attribute in HTML:

- The first textbox has two line in visible by default.
- The second textbox displays 3 lines instead of default value which is we mentioned in the rows attribute.
Browser Support for rows Attribute in HTML:
![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes |