textarea
Тег textarea создает поле для ввода текста. В отличие от input в textarea можно делать переносы строк, и они созраняются при отправке информации на сервер.
Пример:
Таблица 3×3
| Lorem ipsum dolor sit amet, consectetur adipisicing elit |
... |
... |
| ... |
... |
... |
| ... |
... |
... |
<table>
<caption>Таблица 3×3</caption>
<col/>
<tbody>
<tr>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit</td>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
</tbody>
</table>
Атрибуты:
accesskey,
autofocus,
class,
cols,
contenteditable,
contextmenu,
dir,
disabled,
draggable,
form,
hidden,
id,
lang,
maxlength,
name,
onabort,
onblur,
oncanplay,
oncanplaythrough,
onchange,
onclick,
oncontextmenu,
ondblclick,
ondrag,
ondragend,
ondragenter,
ondragleave,
ondragover,
ondragstart,
ondrop,
ondurationchange,
onemptied,
onended,
onerror,
onfocus,
onformchange,
onforminput,
oninput,
oninvalid,
onkeydown,
onkeypress,
onkeyup,
onload,
onloadeddata,
onloadedmetadata,
onloadstart,
onmousedown,
onmousemove,
onmouseout,
onmouseover,
onmouseup,
onmousewheel,
onpause,
onplay,
onplaying,
onprogress,
onratechange,
onreadystatechange,
onscroll,
onseeked,
onseeking,
onselect,
onshow,
onstalled,
onsubmit,
onsuspend,
ontimeupdate,
onvolumechange,
onwaiting,
placeholder,
readonly,
required,
rows,
spellcheck,
style,
tabindex,
title,
wrap,
xml:base,
xml:id,
xml:lang,
xml:space.
|
html 3.2 |
html 4.0 Frameset |
html 4.0 Loose |
html 4.0 Strict |
html 4.0.1 Frameset |
html 4.0.1 Loose |
html 4.0.1 Strict |
xhtml 1 Frameset |
xhtml 1 Strict |
xhtml 1 Transitional |
html5 |
| accesskey |
|
|
|
|
|
|
|
|
|
|
|
| autofocus |
|
|
|
|
|
|
|
|
|
|
|
| class |
|
|
|
|
|
|
|
|
|
|
|
| cols |
|
|
|
|
|
|
|
|
|
|
|
| contenteditable |
|
|
|
|
|
|
|
|
|
|
|
| contextmenu |
|
|
|
|
|
|
|
|
|
|
|
| dir |
|
|
|
|
|
|
|
|
|
|
|
| disabled |
|
|
|
|
|
|
|
|
|
|
|
| draggable |
|
|
|
|
|
|
|
|
|
|
|
| form |
|
|
|
|
|
|
|
|
|
|
|
| hidden |
|
|
|
|
|
|
|
|
|
|
|
| id |
|
|
|
|
|
|
|
|
|
|
|
| lang |
|
|
|
|
|
|
|
|
|
|
|
| maxlength |
|
|
|
|
|
|
|
|
|
|
|
| name |
|
|
|
|
|
|
|
|
|
|
|
| onabort |
|
|
|
|
|
|
|
|
|
|
|
| onblur |
|
|
|
|
|
|
|
|
|
|
|
| oncanplay |
|
|
|
|
|
|
|
|
|
|
|
| oncanplaythrough |
|
|
|
|
|
|
|
|
|
|
|
| onchange |
|
|
|
|
|
|
|
|
|
|
|
| onclick |
|
|
|
|
|
|
|
|
|
|
|
| oncontextmenu |
|
|
|
|
|
|
|
|
|
|
|
| ondblclick |
|
|
|
|
|
|
|
|
|
|
|
| ondrag |
|
|
|
|
|
|
|
|
|
|
|
| ondragend |
|
|
|
|
|
|
|
|
|
|
|
| ondragenter |
|
|
|
|
|
|
|
|
|
|
|
| ondragleave |
|
|
|
|
|
|
|
|
|
|
|
| ondragover |
|
|
|
|
|
|
|
|
|
|
|
| ondragstart |
|
|
|
|
|
|
|
|
|
|
|
| ondrop |
|
|
|
|
|
|
|
|
|
|
|
| ondurationchange |
|
|
|
|
|
|
|
|
|
|
|
| onemptied |
|
|
|
|
|
|
|
|
|
|
|
| onended |
|
|
|
|
|
|
|
|
|
|
|
| onerror |
|
|
|
|
|
|
|
|
|
|
|
| onfocus |
|
|
|
|
|
|
|
|
|
|
|
| onformchange |
|
|
|
|
|
|
|
|
|
|
|
| onforminput |
|
|
|
|
|
|
|
|
|
|
|
| oninput |
|
|
|
|
|
|
|
|
|
|
|
| oninvalid |
|
|
|
|
|
|
|
|
|
|
|
| onkeydown |
|
|
|
|
|
|
|
|
|
|
|
| onkeypress |
|
|
|
|
|
|
|
|
|
|
|
| onkeyup |
|
|
|
|
|
|
|
|
|
|
|
| onload |
|
|
|
|
|
|
|
|
|
|
|
| onloadeddata |
|
|
|
|
|
|
|
|
|
|
|
| onloadedmetadata |
|
|
|
|
|
|
|
|
|
|
|
| onloadstart |
|
|
|
|
|
|
|
|
|
|
|
| onmousedown |
|
|
|
|
|
|
|
|
|
|
|
| onmousemove |
|
|
|
|
|
|
|
|
|
|
|
| onmouseout |
|
|
|
|
|
|
|
|
|
|
|
| onmouseover |
|
|
|
|
|
|
|
|
|
|
|
| onmouseup |
|
|
|
|
|
|
|
|
|
|
|
| onmousewheel |
|
|
|
|
|
|
|
|
|
|
|
| onpause |
|
|
|
|
|
|
|
|
|
|
|
| onplay |
|
|
|
|
|
|
|
|
|
|
|
| onplaying |
|
|
|
|
|
|
|
|
|
|
|
| onprogress |
|
|
|
|
|
|
|
|
|
|
|
| onratechange |
|
|
|
|
|
|
|
|
|
|
|
| onreadystatechange |
|
|
|
|
|
|
|
|
|
|
|
| onscroll |
|
|
|
|
|
|
|
|
|
|
|
| onseeked |
|
|
|
|
|
|
|
|
|
|
|
| onseeking |
|
|
|
|
|
|
|
|
|
|
|
| onselect |
|
|
|
|
|
|
|
|
|
|
|
| onshow |
|
|
|
|
|
|
|
|
|
|
|
| onstalled |
|
|
|
|
|
|
|
|
|
|
|
| onsubmit |
|
|
|
|
|
|
|
|
|
|
|
| onsuspend |
|
|
|
|
|
|
|
|
|
|
|
| ontimeupdate |
|
|
|
|
|
|
|
|
|
|
|
| onvolumechange |
|
|
|
|
|
|
|
|
|
|
|
| onwaiting |
|
|
|
|
|
|
|
|
|
|
|
| placeholder |
|
|
|
|
|
|
|
|
|
|
|
| readonly |
|
|
|
|
|
|
|
|
|
|
|
| required |
|
|
|
|
|
|
|
|
|
|
|
| rows |
|
|
|
|
|
|
|
|
|
|
|
| spellcheck |
|
|
|
|
|
|
|
|
|
|
|
| style |
|
|
|
|
|
|
|
|
|
|
|
| tabindex |
|
|
|
|
|
|
|
|
|
|
|
| title |
|
|
|
|
|
|
|
|
|
|
|
| wrap |
|
|
|
|
|
|
|
|
|
|
|
| xml:base |
|
|
|
|
|
|
|
|
|
|
|
| xml:id |
|
|
|
|
|
|
|
|
|
|
|
| xml:lang |
|
|
|
|
|
|
|
|
|
|
|
| xml:space |
|
|
|
|
|
|
|
|
|
|
|
Браузерные стили
| Chrome |
textarea { -webkit-appearance: textarea; -webkit-box-orient: vertical; -webkit-rtl-ordering: logical; -webkit-user-select: text; background-color: white; border: 1px solid; color: initial; cursor: auto; display: inline-block; font: -webkit-small-control; letter-spacing: normal; line-height: normal; margin: 0; padding: 2px; resize: auto; text-align: -webkit-auto; text-indent: 0; text-shadow: none; text-transform: none; white-space: pre-wrap; word-spacing: normal; word-wrap: break-word; }
|
textarea::-webkit-input-placeholder { color: darkGray; }
|
textarea:focus { outline-offset: -2px; }
|
| firefox 3.6.3 |
textarea { -moz-appearance: textfield-multiline; -moz-binding: url("chrome://global/content/platformHTMLBindings.xml#textAreas"); -moz-user-select: text; background-color: -moz-Field; border: 2px inset ThreeDFace; color: -moz-FieldText; cursor: text; font: medium -moz-fixed; letter-spacing: normal; margin: 1px 0 1px 0; text-align: start; text-indent: 0; text-rendering: optimizeLegibility; text-shadow: none; text-transform: none; vertical-align: text-bottom; word-spacing: normal; word-wrap: break-word; }
|
textarea:-moz-read-write { -moz-user-modify: read-write !important; }
|
textarea[disabled] { -moz-user-focus: ignore; -moz-user-input: disabled; background-color: ThreeDFace; color: GrayText; cursor: inherit; }
|
| ie6, ie7 |
textarea { background-color: #fff; border: 2px inset; font: 10pt Courier New; has-layout: true; overflow: scroll; overflow-x: hidden; padding: 1px; white-space: pre; }
|
| ie8 |
textarea { -ms-overflow-x: hidden; background-color: #fff; border: 2px inset; display: inline-block; font: 10pt Courier New; has-layout: true; overflow: scroll; padding: 1px; white-space: pre-wrap; }
|
| opera 10.53 |
textarea { border: 2px #000; font: 12px monospace; height: 32px; padding: 1px; width: 155px; }
|
| safari 4.0.5 |
textarea { -webkit-appearance: textarea; -webkit-box-orient: vertical; -webkit-rtl-ordering: logical; -webkit-user-select: text; background-color: white; border: 1px solid; color: initial; cursor: auto; display: inline-block; font: -webkit-small-control; letter-spacing: normal; line-height: normal; margin: 0; resize: auto; text-align: -webkit-auto; text-indent: 0; text-shadow: none; text-transform: none; word-spacing: normal; }
|
textarea:focus { outline-offset: -2px; }
|