New! My 44-page ebook "CSS in 44 minutes" is out! 😃

Get it now →

# textarea

Defines a multi-line text control within a web form.

name

Defines the unique identifier for that textarea within the form. It allows the server to access each textarea's value when submitted.

Required.

"message"

The name value must be unique within the context of a <form> container.

It can only contain alphanumeric characters a-z A-Z 0-9 and some special characters like - _… but no space.

autocomplete

Determines if the browser can autocomplete the textarea.

"off"

The browser will disable autocomplete functions..

"on"

The browser will enable autocomplete functions.

minlength

Defines the minimum amount of characters the textarea required to be valid.

"15"

You can use integers.

maxlength

Defines the maxlength amount of characters allowed.

"140"

You can use integers.

placeholder

Defines a non-selectable placeholder text that only appears when the textarea is empty.

"e.g. Hello my name is Alex"

You can hint at the format expected for the textarea.

cols

Defines the number of columns.

"40"

You can use integers.

rows

Defines the number of rows.

"5"

You can use integers.

wrap

Defines how the text should be wrapped.

"hard"

The text will always be wrapped depending on the cols value.

"soft"

The text will only break when needed.

disabled

Disables the textarea.

No value required.

required

Tells the browser that this textarea is required. Leaving it empty will show a warning.

No value required.

autofocus

Sets focus on the textarea when the web page loads.

No value required.

readonly

Turns the textarea into a read-only element.

No value required.

spellcheck

Enables the browser spell checker.

No value required.