HTML Textarea Field

The textarea control is similar to the text control, however the textarea is multi-line. It is generally used when a lot of text will be submitted.

The textarea does not start with input, it has its own tag:

Sponsored Links

The code for that is:

<textarea cols="25" name="mytextbox" rows="8"></textarea>

The cols and rows attribute define the size of the textarea. Text entered in the textarea field will wrap inside it.

As before, you can also have required and placeholder attributes.

Code for the above form:

<textarea cols="25" placeholder="Enter your message" required="required" rows="8"></textarea><br />
<input type="submit" value="submit" />