This page documents how to create code examples with appropriate highlighting.

How To:

  • All code blocks should be enclosed in <pre> tags
  • Additionally `data-lang="something"` attribute should be set. The value should be one the langauges that we currently support (look through the examples below for a list of all supported languages)
That's it.


<pre data-lang="cypher">MATCH (u:User) where = "John Doe" RETURN u</pre>
MATCH (u:User) where = "John Doe" RETURN u


<pre data-lang="javascript">....</pre>
// Demo code (the actual new parser character stream implementation)

function StringStream(string) {
  this.pos = 0;
  this.string = string;


<pre data-lang="python">....</pre>
import numpy as np
cimport cython
from libc.math cimport sqrt


<pre data-lang="php">....</pre>
 1, 'b' => 2, 3 => 'c');

echo "$a[a] ${a[3] /* } comment */} {$a[b]} \$a[a]";

function hello($who) {
	return "Hello $who!";

The program says .


<pre data-lang="dockerfile">....</pre>
# Install Ghost blogging platform and run development environment
# VERSION 1.0.0

FROM ubuntu:12.10
MAINTAINER Amer Grgic ""
WORKDIR /data/ghost


<pre data-lang="go">....</pre>
// Prime Sieve in Go.
// Taken from the Go specification.
// Copyright © The Go Authors.

package main

import "fmt"

// Send the sequence 2, 3, 4, ... to channel 'ch'.
func generate(ch chan<- int) {
	for i := 2; ; i++ {
		ch <- i  // Send 'i' to channel 'ch'

If there is any other language that you would like to be supported on the website, please reach out to the web team (slack: #neo4j-com)