Glossary Term
HTML textarea element
The <textarea> HTML element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form.
The above example demonstrates a number of features of <textarea>:
An id attribute to allow the <textarea> to be associated with a <label> element for accessibility purposes A name attribute to set the name of the associated data point submitted to the server when the form is submitted. rows and cols attributes to allow you to specify an exact size for the <textarea> to take. Setting these is a good idea for consistency, as browser defaults can differ. The <textarea> element specifies its content differently in HTML and JavaScript contexts: In HTML, the initial content of a <textarea> is specified between its opening and closing tags, not as a value attribute. In JavaScript, <textarea> elements have a value property that can be used to get or set the current content, and defaultValue to get and set its initial value (equivalent to accessing the HTML element’s text content).
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
