Home  »  HTML   »   textarea

An input element to take multiline input from the user. We can define the size of the text area using attributes.

autofocus

represents the textarea that gets automatically focus when the page loads.

  • none
cols

represents the visible width of the text area. The width is specified in characters.

  • number
dirname

represents the name of the field that is used for sending text direction when the textarea is submitted.

  • textarea.dir - ltr (left to right), rtl (right to left)
disabled

represents the textarea that gets disabled when the page loads.

  • none
form

represents to which form the textarea element belongs.

  • form_id - id of the <form> element.
maxlength

represents the maximum number of characters the textarea can accumulate.

  • number
name

represents the name of a textarea element.

  • text
placeholder

represents a visible text that describes what value to be entered in that textarea.

  • text
readonly

represents the textarea cannot be changed.

  • none
required

represents that the data should be filled in textarea compulsory.

  • none
rows

represents the visible numbers of rows of the textarea element.

  • number
wrap

represents how the text is wrapped in the textarea.

  • hard - text is wrapped in the textarea. cols attribute must be specified.
  • soft - text is not wrapped in the textarea. Default value.

HTML textarea Example
Edit Example