IT. Expert System.

HTML

textarea


Tag Description

The textarea tag is used to define a multi-line text input control. A text area can contain an unlimited number of characters. The text within a text area is rendered in a fixed-width font (usually Courier).

This tag has the form:

<textarea
  name="text"
  rows="number"
  cols="number" >
</textarea>

HTML5 and HTML4.01 Differences

HTML5 has defined new attributes.

HTML5   = New for HTML5

Attributes

Attribute Value Description
cols number (required) Specifies the visible number of columns of a text-area
rows number (required) Specifies the visible number of rows in a text-area
autofocusHTML5 autofocus Makes the field focused on page load
disabled disabled Specifies that a text-area should be disabled
formHTML5 form_id Defines one ore more forms the field belongs to
maxlengthHTML5 number Defines the maximum number of characters allowed in the textarea
name text Specifies the name for a text-area
placeholderHTML5 text Defines a hint to help users fill out the textarea
readonly readonly Specifies that a text-area should be read-only
requiredHTML5 required Specifies that the textarea's value is required in order to submit the form
wrapHTML5 hard
soft
Specifies how to wrap the textarea's content when submitted. If the value is "hard" then line breaks are added at the "cols" attribute's value (default = "soft" - adds no line breaks)

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<textarea rows="2" cols="40">
This is a multi-line text area.
This is the second line.
</textarea>

This produces the following result:

Browser Support

Chrome Firefox IE Safari Opera

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML4
Empty Tag: No


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 148 / 158850812. Delta: 0.04770 с