HTML textarea cols property
Examples
With the specified height and width of the text area:
<textarea rows="4" cols="50">
在 w3big.com 您将学习如何制作一个网站。我们提供了所有 Web 开发免费教程。
</textarea>
在 w3big.com 您将学习如何制作一个网站。我们提供了所有 Web 开发免费教程。
</textarea>
try it"
Browser Support
All major browsers support cols attribute.
Definition and Usage
Cols attribute specifies the widths of the visible text area.
Note: textarea size of CSS can also set the height and width attributes.
Differences between HTML 4.01 and HTML5
no.
grammar
<textarea cols="number">
Property Value
值 | 描述 |
---|---|
number | 规定文本区域的宽度(以平均字符宽度计)。默认值是 20。 |
HTML <textarea> tag