Thuộc tính bao bọc HTML <textareosystem

❮ Thẻ HTML <textareosystem

Thí dụ

Văn bản trong vùng văn bản có wrap = "hard" sẽ chứa các dòng mới (nếu có) khi được gửi dưới dạng:

<textarea rows="2" cols="20" wrap="hard">
At W3Schools you will find free Web-building tutorials.
</textarea>

Định nghĩa và Cách sử dụng

Thuộc wraptính chỉ định cách văn bản trong vùng văn bản sẽ được bao bọc khi gửi dưới dạng biểu mẫu.


Hỗ trợ trình duyệt

Attribute
wrap Yes Yes Yes Yes Yes

Cú pháp

<textarea wrap="soft|hard">

Giá trị thuộc tính

Value Description
soft The text in the textarea is not wrapped when submitted in a form. This is default
hard The text in the textarea is wrapped (contains newlines) when submitted in a form. When "hard" is used, the cols attribute must be specified

❮ Thẻ HTML <textareosystem