C & G web

Preformatted text

<pre> stands for "preformatted". Preformatted text differs from regular text in two important ways: (1) It will appear in a monospaced, or fixed-width font (making it look typewritten), and (2) it will appear in the browser window exactly as you typed it, including carriage returns and spaces.

Preformatted text is best used when displaying code, ASCII art, ee cummings poetry, or anything else in which line returns and spaces are intentional and essential. But beware the perils of preformatting: You must hit return on each line, or the text will trail off the browser window.

Example - Preformatted text


		The document content goes here	
		The document content goes here	
		The document content goes here
			
		The document content goes here	
		The document content goes here

The HTML

<html>
<head>
	<title>Preformatted text</title>
</head>

<body>
	
<pre>

		The document content goes here	
		The document content goes here	
		The document content goes here
			
		The document content goes here	
		The document content goes here

</pre>

</body>
</html>	
		

Previous page...

Back to Top of Page

Computeach International Ltd

Christopher Ward London Limited

Christopher Ward London Limited