Prism WP

Beautify the source codes displayed on your site using the Prism syntax highlighter.


How To Use

Preparing the Markup

The following markup is used:

<pre><code class="language-xxx">
    //Insert your code here

Notice the class language-xxx. You need to change language-xxx to the language you want to use. Below is the list of supported languages and their corresponding CSS class:

Bash class="language-bash"
C class="language-c"
CoffeeScript class="language-coffeescript"
C++ class="language-cpp"
C# class="language-csharp"
CSS class="language-css"
Gherkin class="language-gherkin"
Groovy class="language-groovy"
HTTP class="language-http"
Java class="language-java"
JavaScript class="language-javascript"
Markup class="language-markup"
PHP class="language-php"
Python class="language-python"
Ruby class="language-bass"
SCSS class="language-scss"
SQL class="language-sql"

Line Numbers

To use line numbers, check the Line Numbers option in Settings > Prism WP. Then add the class line-numbers to the pre tag:

<pre class="line-numbers" ><code class="language-xxx">
    //Insert your code here



echo Hello World


#include <stdio.h>
int main(void)
    printf("Hello World\n");
    return 0;


# Existence:
alert "Hello World!" if elvis?


#include <iostream>
using namespace std;

int main ()
    cout << "Hello World!";
    return 0;


public class Hello1
    public static void Main()
        System.Console.WriteLine("Hello, World!");


body {
    color: #141412;
    line-height: 1.5;
    margin: 0;
a {
    color: #ca3c08;
    text-decoration: none;
a:visited {
    color: #ac0404;


Feature: Some terse yet descriptive text of what is desired
    In order to realize a named business value
    As an explicit system actor
    I want to gain some beneficial outcome which furthers the goal


println "hello, world"
for (arg in this.args ) {
    println "Argument:" + arg;


HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Server: Apache/ (Unix) (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
ETag: "3f80f-1b6-3e1cb03b"
Content-Type: text/html; charset=UTF-8
Content-Length: 131
Connection: close

    <title>An Example Page</title>
    Hello World, this is a very simple HTML document.


    echo "Hello world";