textarea (multi-line input)

textarea elements allow entry of multiple lines of text into a form.

Content category

Pseudo-classes

Attributes

No note with name p.r.comp.lang.markup.html.attr.autocomplete found in cache during parsing.

  • autofocus focuses the input when it or its parent dialog are made visible.
  • cols sets the number of columns per line.
  • rows sets the number of rows to show.
  • dirname indicates the name of the form field to use for submission of the field's text directionality.
  • disabled indicates that the control should be disabled.
  • form allows explicit association of the element with a form (using its id).
  • minlength sets the minimum length of the value (in UTF-16 code units).
  • maxlength sets the maximum length of the value (in UTF-16 code units).
  • name specifies the name of the input control, and the name against which the value will be submitted. Without this, the value will not be included in submissions.
  • placeholder text is displayed to the user in the form as an example/hint of what is expected.
  • readonly behaves similarly to disabled, but the input's value will still be submitted along with the form.
  • required determines whether an empty value will pass validation.
  • wrap controls text wrapping:
    • hard has the browser insert line breaks (CRLF) in the text to ensure no line has more than cols columns.
    • soft ensures that all line breaks are CRLF, but doesn't insert any additional line breaks.

Value

The element value will have newlines normalised as \n.

References


Backlinks