pre tags to Maintain Formatting

Certify and Increase Opportunity.
Be
Govt. Certified HTML5 Developer

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 (<pre>).

Any text between the opening <pre> tag and the closing </pre> tag will preserve the formatting of the source document.

<pre>
function testFunction( strText ){
   alert (strText)
}
</pre>

This will produce following result:

function testFunction( strText ){
   alert (strText)
}

Get industry recognized certification – Contact us

Menu