Articles → HTML → Pre Tag In HTML

Pre Tag In HTML






Purpose





Syntax


<pre>formatted_text</pre>



Example




<html>
   <head>
      <title>pre demo</title>
   </head>
   <body>
      <pre>This is
the test 
</pre>
      <label>this is 
      the test
      </label>
   </body>
</html>

Try It



Picture showing the output of the pre tag in HTML
Click to Enlarge




Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Friday, September 30, 2016
 
Updated On  -  Saturday, September 16, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250