Date First Published: 21st February 2023
Topic: Web Design & Development
Subtopic: Web Development
Article Type: Computer Terms & Definitions
Difficulty: MediumDifficulty Level: 6/10
Learn more about what the HTML <textarea> tag is in this article.
In HTML, the <textarea> tag is used within a form to define a multi-line plain text form field. A text area can have an unlimited number of characters and the text within this tag is often rendered in a fixed-width font. This tag is often used to define fields where users can enter and submit comments and reviews in a HTML form.
To adjust the width and height of the text area, use CSS.
An example of the <textarea> tag in a HTML form with the output can be seen below:
The table below shows the attributes for the <textarea> tag.
Attribute | Description |
---|---|
autofocus | Specifies that the text area should be selected upon page loading. |
cols | Specifies the visible width of the text area. |
disabled | Specifies that the text ares should be disabled. |
form | Specifies the form(s) that the text area belongs to. |
maxlength | Specifies the maximum number of characters allowed in the textarea. |
name | Specifies a name for the text area. |
placeholder | Specifies a hint that describes the expected value of a text area. It is displayed when the text area is empty and disappears when it gets focus. |
readonly | Specifies that the text area should be read only. |
required | Specifies that the text area must be filled out. |
rows | Defines the height of the text area. |
spellcheck | Specifies whether the text in the text area should be checked for spelling by the browser or operating system. |
wrap | Defines how the text in a text area should be wrapped when the form is submitted. |
If so, it is important that you tell me as soon as possible on this page.
Network Services Network Setups Network Standards Network Hardware Network Identifiers Network Software Internet Protocols Internet Organisations Data Transmission Technologies Web Development Web Design Web Advertising Web Applications Web Organisations Web Technologies Web Services SEO Threats To Systems, Data & Information Security Mechanisms & Technologies Computer Hardware Computer Software Ethics & Sustainability Legislation & User Data Protection