HTML <textarea> cols属性

❮HTML<textarea>タグ

指定された高さと幅のテキスト領域:

<textarea rows="4" cols="50">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>

定義と使用法

このcols属性は、テキスト領域の表示幅を指定します。

ヒント: テキスト領域のサイズは、CSSのheightプロパティとwidthプロパティによっても設定できます。


ブラウザのサポート

Attribute
cols Yes Yes Yes Yes Yes

構文

<textarea cols="number">

属性値

Value Description
number Specifies the width of the text area (in average character width). Default value is 20

❮HTML<textarea>タグ