Adding multi-line text
To create an input field for multi-line text, use the <textarea>
element. This element also accepts several attributes common to the <input>
element, for example, autocomplete
, placeholder
, and required
.
In most browsers, <textarea>
is resizable — you'll notice the handle in the right corner that users can drag to change the input size. This is because the resize
CSS property is enabled by default. If you want to disable it, add the following rule to your style sheet:
textarea {
resize: none;
}