Home Tutorial CSS CSS pre (Preformatted Text)

MSN Random Online

CSS pre (Preformatted Text) PDF Print E-mail
Written by Administrator   
Monday, 17 September 2007 03:13

CSS pre

Defines the properties for a block of preformatted text.

Browser/User Agent Support

IE Netscape Mozilla Opera Safari
2.0+ 1.0+ 1.0+ 4.0+ 1.0+



This example sets the font for preformatted elements to the Courier font family and decreases the font size by one:

pre {
font-family:"Courier New", Courier, monospace;
font-size: smaller;


Since the "pre" tag is often used to designate code samples, you will often set the font for preformatted text to courier or another similar monospace font.


Top Members

No top members yet.