HTML and CSS Reference
included, text will still wrap under Internet Explorer, but older versions of Netscape,
notably Netscape 4, will scroll horizontally in the text box. Given this problem, even though
it is nonstandard, it may be a good idea to include the wrap attribute. HTML5 reintroduces
this attribute with the values of hard and soft . Use of this attribute assumes that the cols
attribute has been set properly.
<textarea id="CommentBox" cols="40" rows="8">
Default text in field
<textarea name="comment" id="comment" rows="10" cols="40" wrap="hard"
HTML 2, 3.2, 4, 4.01, 5
XHTML 1.0, 1.1, Basic
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 4+, Safari 1+
• Any text between the <textarea> and </textarea> tags is rendered as the default
entry for the form control. Content within a textarea element is not interpreted, so
white space is preserved and tags themselves are ignored.
• The textarea element traditionally lacks a maxlength attribute, which causes a
more obvious security risk. The HTML5 specification does introduce a maxlength
value to restrict the number of characters that may be entered. However, it should
be noted that all client-side form validations should be assumed as user
conveniences only and not security, as they may be easily removed by malicious
• A <textarea> tag cannot be a descendent of an a (anchor) or button element.
• The HTML 4.01 specification reserves the datafld and datasrc attributes for
future use with the textarea element.
• The HTML 2.0 and 3.2 specifications define only the cols , name , and rows
attributes for this element.
<tfoot> (Table Footer)
This element is used to group the rows within the footer of a table so that common
alignment and style defaults can easily be set for numerous cells. This element might be
particularly useful when setting a common footer for tables that are dynamically generated.
align="center | char | justify | left | right"