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



Rows attribute in html

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 Code Explanation

  1. rows attribute used to specifies that the no of line to visible in the textarea.

Output for rows Attribute in HTML:

rows Attribute Output

  1. The first textbox has two line in visible by default.
  2. 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

Related Searches to rows attribute in html