Table of Contents
grammar
Example 3
Example 2: Using Javascript
Home Web Front-end HTML Tutorial How can we set the number of visible lines of a text area in HTML?

How can we set the number of visible lines of a text area in HTML?

Sep 16, 2023 pm 10:41 PM

How can we set the number of visible lines of a text area in HTML?

This article will teach you how to set the number of visible lines in a text area in HTML. The HTML

grammar

The following is the syntax for setting the number of visible lines in a text area -

<textarea rows = "value">
Copy after login

Use the HTML textarea rows attribute to specify the number of displayed rows or visible text rows of the control. Additionally, it specifies the visible height of the text area.

The following is an example of setting the number of visible lines in an HTML text area.

Example 1

In the following example, we are using the