HTML rows 属性

htmlweb developmentfront end technology更新于 2024/5/23 9:48:17

HTML rows 属性定义 HTML 文档中 textarea  元素的可见高度。

语法

以下是语法 −

<textarea rows=”number”></textarea>

让我们看一个 HTML rows 属性的示例 −

示例

<!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>

输出


相关文章


有用资源