Learning Resources
 

pre tags to Maintain Formatting


Sometimes you want your text to follow the exact format of how it is written in the HTML document. In those cases, you can use the preformatted tag (

).

Any text between the opening

 tag and the closing 
tag will preserve the formatting of the source document.

function testFunction( strText ){
   alert (strText)
}

This will produce following result:

function testFunction( strText ){
   alert (strText)
}