HTML <textarea> colsแอตทริบิวต์
ตัวอย่าง
พื้นที่ข้อความที่มีความสูงและความกว้างที่ระบุ:
<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
รองรับเบราว์เซอร์
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>