0% found this document useful (0 votes)
56 views1 page

Preformatted HTML

This document contains the tutorial about the preformatted tag of html.

Uploaded by

Sourabh Bhandari
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views1 page

Preformatted HTML

This document contains the tutorial about the preformatted tag of html.

Uploaded by

Sourabh Bhandari
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PREFORMATTED TAG

Usually the browser ignores all white spaces and extra returns and automatically breaks
lines according to size of the browser. However there is a way to make browser display
the text exactly as you type in your HTML document. The preformatted text lets you
maintain the original spaces and line breaks that you have inserted in your text. Let us
demonstrate the <pre> tags with code below :

<html>
<head>
<title>Preformatted tag</title>
</head>
<body>
<pre>
Hello there !...
My name is sourabh bhandari... I am studying in Guru Nanak Dev University
situated
in holy city of amritsar.
</pre>
</body>
</html>

The following table describes the attributes that is supported by <pre> tag :

Attribute class, dir, id, lang, onClick, onDblClick,


onKeyDown, onKeyPress, onKeyUp, onMouseDown,
onMouseMove, onMouseOut, onMouseOver,
onMouseUp, style, title, width.

© Copyright Sourabh Bhandari http://sourabhandari.in

You might also like