The HTML rows attribute define the visible height of a textarea element in an HTML document.
Syntax
Following is the syntax −
<textarea rows=”number”></textarea>
Let us see an example of HTML rows Attribute −
Example
<!DOCTYPE html> <html> <style> body { color: #000; height: 100vh; background-color: #8BC6EC; background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%); text-align: center; } </style> <body> <h1>HTML rows Demo</h1> <textarea rows="10" cols="20">Hi! I'm a textarea element with some dummy text.</textarea> </body> </html>