title: Is there any API or website that could colorcode my Java codes and transform it into html?
body: <p>I have a piece of Java code that I want to post on my website. </p>
  
  <p>The code looks like this:</p>
  
  <pre><code>class Integers {
    public static void main(String[] arguments) {
      int c; //declaring a variable
  
    /* Using for loop to repeat instruction execution */
  
      for (c = 1; c &lt;= 10; c++) {
        System.out.println(c);
      }
    }
  }
  </code></pre>
  
  <p>In order to transform it into a good looking HTML and post it on my website i need to write the following:</p>
  
  <pre><code>&lt;div class="geshifilter"&gt;
  &lt;pre class="java geshifilter-java" style="font-family:monospace;"&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;class&lt;/span&gt; Integers &lt;span style="color: #009900;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;public&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;static&lt;/span&gt; &lt;span style="color: #000066; font-weight: bold;"&gt;void&lt;/span&gt; main&lt;span style="color: #009900;"&gt;(&lt;/span&gt;&lt;span style="color: #003399;"&gt;String&lt;/span&gt;&lt;span style="color: #009900;"&gt;[&lt;/span&gt;&lt;span style="color: #009900;"&gt;]&lt;/span&gt; arguments&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;
      &lt;span style="color: #000066; font-weight: bold;"&gt;int&lt;/span&gt; c&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #666666; font-style: italic;"&gt;//declaring a variable&lt;/span&gt;
  &amp;nbsp;
    &lt;span style="color: #666666; font-style: italic;"&gt;/* Using for loop to repeat instruction execution */&lt;/span&gt;
  &amp;nbsp;
      &lt;span style="color: #000000; font-weight: bold;"&gt;for&lt;/span&gt; &lt;span style="color: #009900;"&gt;(&lt;/span&gt;c &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; c &lt;span style="color: #339933;"&gt;&amp;lt;=&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;10&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; c&lt;span style="color: #339933;"&gt;++&lt;/span&gt;&lt;span style="color: #009900;"&gt;)&lt;/span&gt; &lt;span style="color: #009900;"&gt;{&lt;/span&gt;
        &lt;span style="color: #003399;"&gt;System&lt;/span&gt;.&lt;span style="color: #006633;"&gt;out&lt;/span&gt;.&lt;span style="color: #006633;"&gt;println&lt;/span&gt;&lt;span style="color: #009900;"&gt;(&lt;/span&gt;c&lt;span style="color: #009900;"&gt;)&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;}&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;}&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
  </code></pre>
  
  <p>There is too much hassle doing this. Is there any easier way? </p>