HTML and CSS Reference
In-Depth Information
Compatibility
HTML 2 Firefox 1+, Internet Explorer 2+, Netscape 1+, Opera 4+, Safari 1+
Notes
• No closing tag for this element is necessary because the browser will ignore all tags
after the starting tag.
• This element should not be used. Plain text information can be indicated by a file
type, and information can be inserted in a preformatted fashion using the pre
element.
• All modern browsers at the time of this edition continue to support this tag despite
documentation to the contrary.
<pre> (Preformatted Text)
This element is used to indicate that the enclosed text is preformatted, meaning that spaces,
returns, tabs, and other formatting characters are preserved. Browsers will, however,
acknowledge most HTML elements that are found within a <pre> tag. Preformatted text
generally will be rendered by the browsers in a monospaced font.
Standard Syntax
<pre
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric value"
lang="language code"
style="style information"
title="advisory text"
width="number" (transitional only)
xml:space="preserve">
</pre>
Attributes Introduced by HTML5
accesskey="spaced list of accelerator key(s)"
contenteditable="true | false | inherit"
contextmenu="id of menu"
data-X="user-defined data"
draggable="true | false | auto"
hidden="hidden"
itemid="microdata id in URL format"
itemprop="microdata value"
itemref="space-separated list of IDs that may contain microdata"
itemscope="itemscope"
itemtype="microdata type in URL format"
spellcheck="true | false"
tabindex="number"
Search WWH ::




Custom Search