HTML » Tags » textarea

Version: 2.0, 3.2, 4.0

Compability: Explorer 4, 5  Netscape 4, 6

<textarea> ... </textarea>

The <textarea> tag is used to create a multi-line text input window form control (field). Control is a technical term that refers to the various elements (buttons, check boxes, radio buttons, text areas) that can be used inside a form to gather information.

The four tags that can be used to build a form are:
button     input     select     textarea
The textarea control should be used when the user needs to input more than one line of data. If you only expect the user to input a few words, you should use the input tag with type="text" control that creates a one line text input window.
Any text or HTML code that occurs between the opening and closing textarea tags will appear inside the textarea window. Therefore, the closing tag is mandatory.


<form action="html_textarea.html" method="post">
<textarea name="textarea12">
This is the default size.
<textarea cols="45" rows="4" name="textarea13">


This example shows two textarea windows, the first is not sized and the second is sized.

Language(s): HTML

See Also: