Highlight.js highlights syntax in code examples on blogs, forums and in fact on any web pages. It's very easy to use because it works automatically: finds blocks of code, detects a language, highlights it.

Dependencies
Libraries API
highlight.js

Installation

  1. Download the module and place it in the sites/all/modules directory
  2. Download the highlight.js library and place it in the sites/all/libraries and rename it to highlightjs.
  3. Enable highlight js and highlight js filter module.
  4. Enable the filter setting for the filter format.

Usage
Use <code> to output code in a given language. In this case the library will try to detect the language automatically.

OR

Use <code lang="css"> to output code in a given language.

To disable highlighting of a fragment altogether use "no-highlight" class.
<code class="no-highlight">

Project information

Releases