Roots
Back

Textarea

How to create a textarea

<textarea name="name"> default-text </textarea>

name - This name identifies the text area in the same way as naming a text field.
default-text - This text appears in the textarea when it first appears.

For example;

<form action="form-process.php" method="get">
Information:<br>
<textarea name="info"> Please enter information. </textarea><br>
<input type="submit" value="Submit">
</form>

Information:


Additional Attributes

<textarea name="name" cols="number" rows="number" wrap="hard / soft / off"> default-text </textarea>

number - The number of columns or rows the textarea should have.
hard - Wrap long lines of text in the textarea and include these line breaks when the data is submitted.
soft - Wrap long lines of text in the textarea, but do not insert line breaks into the content when submitted.
off - Do not automatically wrap long lines of text to the next line.

<form action="form-process.php" method="get">
Information:<br>
<textarea name="info" cols="50" rows="5" wrap="soft">Please enter information about yourself, your friends and your hobbies. </textarea><br>
<input type="submit" value="Submit">
</form>

Information: