HTML textarea tag

html textarea tag

Definition of HTML textarea tag

HTML multiline textarea is used to show multiline input box. This input box can contain an unlimited number of lines for the user to enter text messages.

A text area holds rows and columns where the user puts a large number of texts.



Syntax

An example to show HTML multiline textarea inside HTML form tag.

Output



What is the HTML multiline textarea?

A HTML multiline textarea is the box where the user can enter unlimited length text. You can define the rows and columns of the textarea to define its size. User can enter larger, longer text with these defined sizes.

When a user enters text larger than the defined size. A vertical scrollbar will appear.

List of HTML textarea tag attributes

Sr. No.Atribute namesDescription
1autocompleteThis attribute used to specify the textarea field to autocomplete using the user history. By default the value of this attribute is on.

  • The value for autocomplete can be

    • on
    • off
2colsDefine the width of the textarea.

  • cols holds a numeric value
3disabledmake text area disable.

  • value is disabled.
4formrelates the textarea with the forms.

  • It holds the value as the form Id.
5maxlengthdefine the maximum character user allowed to enter in the textarea.

  • It holds an numeric value.
6minlengthminimum character allowed in the textarea defined by this attribute.

  • It holds a numeric value
6nameDefine a name for this field.
7placeholderSpecify a text in this attribute to give the user some hints.
8readonlymake text area only to read and user not able to put any value.
9requiredmake textarea required for the user to put some value.
10rowsdefine the height of the textarea. This specifies how many rows visible to the user in textarea.

  • This holds a numeric value.
11wrapDefines the wrapping of the textarea on submission in the form.

  • value can be hard and soft.

See W3C Specification for this tag.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.