Jazzo.co.uk uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our Privacy Policy and our Terms & Condition.

HTML <textarea>

query_builder | Christopher Pisani

The HTML element <textarea> is a multiple line text input. The difference between a <textarea> and a < input> is that the < textarea> can hold multiple lines in an input window and reserve the breaking of lines and whitespace.

Important Note :


Unlike an < input> element, <textarea> needs an opening tag <textarea> and a closing tag </textarea>
A simple <textarea> example
To add value to a <textarea>, you simply put the data between the opening and closing tags
A placeholder attribute can be used to show a title for the <textarea>

Available Attributes


Attribute Values Functionality
autofocus To set focus on the element when pages loads
cols number The width of the element
dirname The text direction of the textarea to be submitted
disabled Disables the element
form form's id The id of the form it belongs to
maxlength number The maximum number of charchters allowed in the element
name text The name of the element
placeholder text A dimmed description or title for the element
readonly Specifies that the element is read only
required Specifies that the element can not be empty when used in a form
rows number The number of rows in the element
wrap Specifies that text will be wrapped in the element when used in a form