Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

pre

The <pre> preformatted text element is used to preserve returns, tabs and all whitespace. It is especially useful for displaying <code> in a document.

Code Example

<pre> My whitespace is preserved. 1234 </pre> open in code editor

Attributes

globals - the global attributes common to all elements possible values: see global attribute list

Official Documentation

http://www.w3.org/TR/html/grouping-content.html#the-pre-element

HTML

Elements

aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr