Thanks to visit codestin.com
Credit goes to www.cssportal.com

CSS Portal

HTML rows Attribute

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The rows attribute in HTML is primarily used in the context of a <textarea> element. This attribute specifies the visible height of a text area, determining the number of lines that will be visible to the user without needing to scroll. It accepts a numerical value that represents the number of text lines. By adjusting the rows attribute, developers can control the text area's vertical size, making it more suitable for its intended use, whether for a short comment box or a larger text editing area. For instance, setting rows="4" makes the text area four lines tall. It's important to note that while the rows attribute helps define the initial size of the text area, users can typically resize it in their browser unless the resizing feature is explicitly disabled with CSS.

Syntax

<textarea rows="number">

Values

  • numberA number that specifies the rows of a textarea.

Applies To

Example

<textarea rows="10" cols="50">This is a text area with 10 rows and 50 columns.</textarea>

Browser Support

The following information will show you the current browser support for the HTML rows attribute. Hover over a browser icon to see the version that first introduced support for this HTML attribute.

This attribute is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 29th March 2024

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!