Everything2
Near Matches
Ignore Exact
Full Text
Everything2

pre

"pre" is also a: user

created by Woundweavr

(thing) by Woundweavr (4 y) (print)   ?   (I like it!) Sat Nov 13 1999 at 14:25:19

Prefix that means before. One of the most common prefixes in the English language. Opposite of post.

(thing) by /dev/joe (4.2 y) (print)   ?   (I like it!) Tue May 09 2000 at 13:54:55

An HTML tag, short for preformatted, which indicates that the next section (up to the next </PRE> tag) should be displayed in a fixed-width font and exactly as is, not condensing all sequences of whitespace into a single space as is the usual for other HTML.

Special characters like & codes and tags in < > still have meaning within the section, though not all possible formatting makes sense within a preformatted section.

Useful for displaying ASCII art.

See also: <TT>.


(thing) by in10se (8.2 hr) (print)   ?   (I like it!) Fri Aug 08 2003 at 18:54:52

pre is an HTML tag that is used to specify preformatted text within an HTML document. Unlike the code or tt tags, it does not ignore newlines and carriage returns, so extraneous br (line break) tags can (and should) be left out of the formatting. The tag is good for including long segments of source code, creating rows and columns of data that line up properly, and for ascii art since it uses a fixed width font to display your text.

The pre tag is very useful when trying to display ASCII art in your writeups or any other HTML page.

See also: code, font, kbd, plaintext, samp, tt

Attributes

The pre tag does not have any required HTML attributes. Regardless of this fact, and the fact that attributes are rarely used with this tag, the following are all valid:

Usage

To use the pre tag, simply place opening and closing HTML tags around the preformatted text. For example:

<pre>    |   |  T | I | C ---+---+---  T | A | C ---+---+---  T | O | E    |   | </pre> 

On browsers that support this tag, this will typically cause the text above to be displayed in a monospace font. It should be noted that you cannot use the greater than ('>') or less than ('<') symbols in your text1 because these are used for delimiting HTML tags. You should therefore type &gt; to output the greater than symbol, and &lt; to output the less than symbol. A much easier solution is to simply copy and paste your code into the E2 Source Code Formatter which will format it correctly for web use.

It should be noted that while most other HTML tags can be used inside of a two pre tags, there are several that cannot (or rather should not as it would not be valid) due to the way the text is formatted. These invalid tags include: big, img, object, small, sub, and sup.

Everything2 Support?

E2 does provide limited support for the pre tag. It does not allow the use of any of its HTML attributes. Below is how your browser displays the tic tac toe board above here on Everything2:

   |   |  T | I | C ---+---+---  T | A | C ---+---+---  T | O | E    |   | 

For comparison, here is how it would look if you typed the same exact text with the same exact formatting but without using the pre tag:

| | T | I | C ---+---+--- T | A | C ---+---+--- T | O | E | |

Similar to the problem with '<' and '>' above, keep in mind that on E2, square brackets ('[' and ']') can also cause problems with your preformatted text. Again, use the code formatter to fix these problems. If you would like to use this tag with any of its attributes, you can do so in your Notelet Nodelet.

Common Browser Implementations2

Most web browsers support this tag, as it has been around since at least HTML 2. Most browsers will display the formatted text in a monospaced font such as Courier New.

Previous HTML Tag: plaintext (previous E2 supported HTML tag: p)
Next HTML Tag: q
See Also: HTML tags and HTML attributes


1 You can use the greater than and less than symbols if you are placing allowable HTML tags inside of a pre block.

2 Please feel free to send me information about how other browsers implement this tag.


printable version
chaos

HTML attributes HTML tags Q code
E2 HTML tags : Quick Start Editor Log: December 2007 Formatting poems and simple HTML Editor Log: May 2008
Editor Log: January 2005 P Keyboarding Editor Log: August 2007
How to get Apache to send compressed versions of static HTML files A Game of Tag Everything is not accessible E2 Break Tag Utility
E2 HTML TT Steve Prefontaine Pre-
Editor Log: November 2007 Which Tetris block is the coolest? Editor Log: March 2008 &lt;PRE&gt;
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
What you are reading:
John Lee Hooker
I wanted Mary to cry blood
Claude Debussy
September 28, 2006
4'33"
The bravest man I've ever known
Once you have tasted flight: In defense of manned space travel
Indiana Jones' Crusade for the Perfect Female, or Why We Go Grail-Hunting
Internet piracy and the working writer
The Star Trek Project
Installing a faucet
Bella Luna
RumourQuest 2006
New Writeups
Glowing Fish
Tualatin River(place)
The Jacket
Words of Advice(idea)
John_Fox
Good Intentions Gone Wrong(person)
Cuckowski
Slavonic Princess(poetry)
Heitah
Posthumous Oscar(thing)
ignis_glaciesque
University of South Florida(place)
ignis_glaciesque
Flogstaskriket(idea)
liveforever
Caesar's last breath(idea)
dagnyswaggart
she wants to believe(personal)
antigravpussy
he doesn't know, but her eyes widen too far(thing)
dagnyswaggart
Wild tides guard her secrets(poetry)
Lord Brawl
Caesar's last breath(poetry)
locke baron
Forgotten things in space(fiction)
sitaraika
Colours(idea)
etouffee
Wild tides guard her secrets(poetry)
Everything 2 is brought to you by the letter C and The Everything Development Company