pre

< html‎ | elements
Jump to: navigation, search

pre

This article is In Progress.



Summary

The pre tag defines preformatted text. Text in a pre element is displayed in a fixed-width font and preserves both spaces and line breaks.


Overview Table

DOM Interface HTMLPreElement

Internationalization topics related to the pre element:


Compatibility

Do you think this data can be improved? You can ask to add by opening an issue or make a pull request.

Desktop

FeaturesChromeFirefoxInternet ExplorerOperaSafari
Basic support
1.0
Yes
1.0
Yes
?
Yes
?
Yes
?
Yes
width
?
Unknown
?
none
?
Unknown
?
Unknown
?
Unknown
cols
?
none
?
none
?
none
?
none
?
none
wrap
?
Unknown
1.0
Yes
?
Unknown
?
Unknown
?
Unknown

Mobile

FeaturesAndroidFirefox MobileIE PhoneOpera MobileSafari Mobile
Basic support
?
Yes
1.0
Yes
?
Yes
?
Yes
?
Yes
width
?
Unknown
?
none
?
Unknown
?
Unknown
?
Unknown
cols
?
none
1.0
Yes
?
none
?
none
?
none
wrap
?
Unknown
1.0
Yes
?
Unknown
?
Unknown
?
Unknown

Examples

This example uses the PRE element to format text so that it renders exactly as it is typed.

<PRE>
This text is formatted
   exactly
      as
         it
      is
   typed.
</PRE>

Usage

To cater for international users see: Managing text direction in form controls

Notes

Remarks

Text within the PRE element is formatted. Spaces and carriage returns are preserved.

Standards information


HTML information

{


See also

Related pages (MSDN)

  • xmp

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]