HTML <pre> element


<pre> tag define a block of text as is without word wrap.

<pre>
var d = new Date();
alert(d.toDateString()); 
alert(d.getDate()); 
d.setDate(24);
alert(d.toDateString());
</pre>

var d = new Date();
alert(d.toDateString()); 
alert(d.getDate()); 
d.setDate(24);
alert(d.toDateString());


Without <pre> tag, notice the difference.
var d = new Date();
alert(d.toDateString()); 
alert(d.getDate()); 
d.setDate(24);
alert(d.toDateString());

var d = new Date(); alert(d.toDateString()); alert(d.getDate()); d.setDate(24); alert(d.toDateString());

HTML tags will not show as is inside pre tag
<b>New York</b> is a big city.

New York is a big city.

If we want to show "<b>New York</b>" , instead of show "New York" as bold, we can substitute "<" with "<", and ">" with ">".
&lt;b&gt;New York&lt;/b&gt; is a big city.

<b>New York</b> is a big city.