HTML 5 <pre> Tag
Example
Pre formatted text:
<pre>
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both spaces and
line breaks
</pre> |
View it » |
Definition and Usage
The <pre> tag defines preformatted text.
Text in a pre element is displayed in a fixed-width font (usually Courier), and
it preserves both spaces and line breaks.
Differences Between HTML 4.01 and HTML 5
The "width" attribute was deprecated in HTML 4.01, and is not supported in HTML 5.
Tips and Notes
Tip: Use the <pre> element when displaying text with unusual
formatting, or some sort of computer code.
Standard Attributes
The <a> tag also supports the Standard Attributes in HTML 5.
Event Attributes
The <a> tag also supports the Event Attributes
in HTML 5.
|