This post is about how can we use Google Code Prettify to highlight the code which is displayed in my blog. Google Code Prettify is a simple lightweight embeddable java script library. Find the steps below for how to use Google Code Prettify.

Step 1: Add run_prettify.js script and any one of skin styles(sunburt

<script src="" defer=""></script>

Step 2: Use pre tag for representing our code as follows. The following is the example of html code highlighter.

<pre class="prettyprint lang-html linenums">
list of statements

List of Skin Styles

  1. Default
  2. Desert
  3. SunBurst
  4. Sons-Of-Obsidian
  5. Doxy

List of built-in languages supported

bsh, c, cc, cpp, cs, csh, cyc, cv, htm, html, java, js, m, mxml, perl, pl, pm, py, rb, sh, xhtml, xml and xsl

List of additional language supported