pre
Отображает блок предварительно форматированого текста. Отображается моноширинным (непропорциональным) шрифтом и со всеми пробелами между словами (по умолчанию любое количество пробелов, идущих подряд, в html отображается как один).
В отличие от plaintext, использование которого осуждается спецификацией html 4, в теге pre допустимо размещать любые теги, кроме:
applet, basefont, plaintext, big, font, img, object, small, sub и sup.
Пример:
Таблица 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>
Дети:
A,
ABBR,
ACRONYM,
APPLET,
AREA,
AUDIO,
B,
BASEFONT,
BDO,
BIG,
BR,
BUTTON,
CANVAS,
CITE,
CODE,
COMMAND,
DATALIST,
DEL,
DFN,
EM,
EMBED,
I,
IFRAME,
IMG,
INPUT,
INS,
KBD,
KEYGEN,
LABEL,
MAP,
MARK,
METER,
NOSCRIPT,
OBJECT,
OUTPUT,
PROGRESS,
Q,
RUBY,
S,
SAMP,
SCRIPT,
SELECT,
SMALL,
SPAN,
STRIKE,
STRONG,
SUB,
SUP,
TEXTAREA,
TIME,
TT,
U,
VAR,
VIDEO,
WBR.
|
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 |
| a |
|
|
|
|
|
|
|
|
|
|
|
| abbr |
|
|
|
|
|
|
|
|
|
|
|
| acronym |
|
|
|
|
|
|
|
|
|
|
|
| applet |
|
|
|
|
|
|
|
|
|
|
|
| area |
|
|
|
|
|
|
|
|
|
|
|
| audio |
|
|
|
|
|
|
|
|
|
|
|
| b |
|
|
|
|
|
|
|
|
|
|
|
| basefont |
|
|
|
|
|
|
|
|
|
|
|
| bdo |
|
|
|
|
|
|
|
|
|
|
|
| big |
|
|
|
|
|
|
|
|
|
|
|
| br |
|
|
|
|
|
|
|
|
|
|
|
| button |
|
|
|
|
|
|
|
|
|
|
|
| canvas |
|
|
|
|
|
|
|
|
|
|
|
| cite |
|
|
|
|
|
|
|
|
|
|
|
| code |
|
|
|
|
|
|
|
|
|
|
|
| command |
|
|
|
|
|
|
|
|
|
|
|
| datalist |
|
|
|
|
|
|
|
|
|
|
|
| del |
|
|
|
|
|
|
|
|
|
|
|
| dfn |
|
|
|
|
|
|
|
|
|
|
|
| em |
|
|
|
|
|
|
|
|
|
|
|
| embed |
|
|
|
|
|
|
|
|
|
|
|
| i |
|
|
|
|
|
|
|
|
|
|
|
| iframe |
|
|
|
|
|
|
|
|
|
|
|
| img |
|
|
|
|
|
|
|
|
|
|
|
| input |
|
|
|
|
|
|
|
|
|
|
|
| ins |
|
|
|
|
|
|
|
|
|
|
|
| kbd |
|
|
|
|
|
|
|
|
|
|
|
| keygen |
|
|
|
|
|
|
|
|
|
|
|
| label |
|
|
|
|
|
|
|
|
|
|
|
| map |
|
|
|
|
|
|
|
|
|
|
|
| mark |
|
|
|
|
|
|
|
|
|
|
|
| meter |
|
|
|
|
|
|
|
|
|
|
|
| noscript |
|
|
|
|
|
|
|
|
|
|
|
| object |
|
|
|
|
|
|
|
|
|
|
|
| output |
|
|
|
|
|
|
|
|
|
|
|
| progress |
|
|
|
|
|
|
|
|
|
|
|
| q |
|
|
|
|
|
|
|
|
|
|
|
| ruby |
|
|
|
|
|
|
|
|
|
|
|
| s |
|
|
|
|
|
|
|
|
|
|
|
| samp |
|
|
|
|
|
|
|
|
|
|
|
| script |
|
|
|
|
|
|
|
|
|
|
|
| select |
|
|
|
|
|
|
|
|
|
|
|
| small |
|
|
|
|
|
|
|
|
|
|
|
| span |
|
|
|
|
|
|
|
|
|
|
|
| strike |
|
|
|
|
|
|
|
|
|
|
|
| strong |
|
|
|
|
|
|
|
|
|
|
|
| sub |
|
|
|
|
|
|
|
|
|
|
|
| sup |
|
|
|
|
|
|
|
|
|
|
|
| textarea |
|
|
|
|
|
|
|
|
|
|
|
| time |
|
|
|
|
|
|
|
|
|
|
|
| tt |
|
|
|
|
|
|
|
|
|
|
|
| u |
|
|
|
|
|
|
|
|
|
|
|
| var |
|
|
|
|
|
|
|
|
|
|
|
| video |
|
|
|
|
|
|
|
|
|
|
|
| wbr |
|
|
|
|
|
|
|
|
|
|
|
Атрибуты:
accesskey,
class,
contenteditable,
contextmenu,
dir,
draggable,
hidden,
id,
lang,
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,
spellcheck,
style,
tabindex,
title,
width,
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 |
|
|
|
|
|
|
|
|
|
|
|
| class |
|
|
|
|
|
|
|
|
|
|
|
| contenteditable |
|
|
|
|
|
|
|
|
|
|
|
| contextmenu |
|
|
|
|
|
|
|
|
|
|
|
| dir |
|
|
|
|
|
|
|
|
|
|
|
| draggable |
|
|
|
|
|
|
|
|
|
|
|
| hidden |
|
|
|
|
|
|
|
|
|
|
|
| id |
|
|
|
|
|
|
|
|
|
|
|
| lang |
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|
|
|
|
|
|
|
|
|
|
|
| spellcheck |
|
|
|
|
|
|
|
|
|
|
|
| style |
|
|
|
|
|
|
|
|
|
|
|
| tabindex |
|
|
|
|
|
|
|
|
|
|
|
| title |
|
|
|
|
|
|
|
|
|
|
|
| width |
|
|
|
|
|
|
|
|
|
|
|
| xml:base |
|
|
|
|
|
|
|
|
|
|
|
| xml:id |
|
|
|
|
|
|
|
|
|
|
|
| xml:lang |
|
|
|
|
|
|
|
|
|
|
|
| xml:space |
|
|
|
|
|
|
|
|
|
|
|
Браузерные стили
| Chrome |
pre { display: block; font-family: monospace; margin: 1em 0; white-space: pre; }
|
| firefox 3.6.3 |
pre { display: block; font-family: -moz-fixed; margin: 1em 0; unicode-bidi: embed; white-space: pre; }
|
pre:focus { outline: 1px dotted; }
|
pre[_moz_quote=true] { color: blue; }
|
| ie6, ie7 |
pre { display: block; font: 10pt Courier New; margin-bottom: 19px; margin-top: 19px; white-space: pre; }
|
| ie8 |
pre { display: block; font: 10pt Courier New; margin: 1em 0; white-space: pre; }
|
| opera 10.53 |
pre { display: block; font: 13px monospace; margin: 13px 0; white-space: pre; }
|
| safari 4.0.5 |
pre { display: block; font-family: monospace; margin: 1em 0; white-space: pre; }
|