title: Display Java code in html page
body: <p>How to display java code in a html page? I tried with <code>&lt;pre&gt;</code> tag, but syntax highlighting is not happening properly. <code>&lt;pre&gt;</code> tag just maintains the spaces and tabs as it is given. </p>
  
  <p>Got few options from net for syntax highlighting like prettify, syntax highlighter etc..
  With prettify and syntax highlighter, few javascript and css files need to be downloaded and added to the application and java code should be given inside <code>&lt;pre&gt;</code>, but result is not as expected. code is displayed just as a text with given spaces, not as a java code.</p>