WordPress Syntax Highlighting

  • December 21, 2012

I fully intend to include source code examples throughout this blog. The SyntaxHighlighter plugin for WordPress seems to generate nicely formatted code blocks like the one below:

.class {
   color: red;
}
 
input.class {
   border-color: red;
}
 
label.class {
   display: block;
}

This is accomplished through the use of the “sourcecode” tag such as:

[sourcecode language=”css”] Your CSS (or other supported language) code here. [/sourcecode]

Documentation of additional options is available online.

This entry was posted on December 21, 2012.