pre tag in html code example

Example 1: html pre tag

The 
 tag defines preformatted text.

Text in a 
 element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.

Example:
Hello greppers,    ankur
here hope you   all
are enjoying        the 
coding.

Example 2: preformatted text html

 the space before this sentence will stay! so will the following space! 

Example 3: element in html

        My Bonnie lies over the ocean.

         My Bonnie lies over the sea.

         My Bonnie lies over the ocean.

         Oh, bring back my Bonnie to me.
    

Example 4: adding pre tag javascript


  
  
    
{JSON.stringify(values, null, 2)}

Tags:

Misc Example