Demo at http://ahrengot.github.io/Monokai-theme-for-Prism.js/
Prism.js is a lightweight syntax highlighter with no dependencies. It's quite easy to work with too ... All you need to do is include js/libs/prism.js
and `styles/syntax-highlighting.css
Wrap your snippet in a <code class="language-*language*"></code>
tag. That <code>
-tag can optionally be wrapped in a <pre>
tag if you want preformatted output.
<pre><code class="language-*lang*">
<!-- Preformatted code -->
</code></pre>
In other words, wrap in a pre-tag if you want multiple lines as opposed to inline code. Beware that indentation can mess up the padding around the code a bit, so if you get big marins try un-indenting your code snippet
- HTML
- SCSS (Sass/Compass)
- CSS
- JavaScript
- PHP