使用 rows属性设置文本区域中可见的行数。您可以尝试运行以下代码来实现 rows属性-
<!DOCTYPE html> <html> <head> <title>HTML rows attribute</title> </head> <body> <form action = "/cgi-bin/hello_get.cgi" method = "get"> Enter subject <br /> <textarea rows = "5" cols = "50" name = "description"> </textarea><br> <input type = "submit" value = "submit" /> </form> </body> </html>