SyntaxHighlighter – WordPress Plugin

Syntax Highlighting is a method of color coding the code syntax to make it more legible to the reader. For this you embed pieces of code into your website / blog where ever you need to highlight any code in your articles, and the syntax highlighter does the job.

SyntaxHighlighter is a fully functional self-contained code syntax highlighter developed in JavaScript. It helps developers to display code on their website.

Now WordPress.com hosted websites – like this one,  can use the services of the SyntaxHighlighter via its equivalent WordPress plugin.

Check out the following code snippet to know what I mean…

[sourcecode language="css"]
a{
font-weight: bold;
font-family: Arial, "Times New Roman";
font-size: 13pt;
}
[/sourcecode]

Beautiful isn’t it ? It is simple really. I just put the CSS code in between the sourcecode tags. These tags are popularly known as Shortcodes. (Learn how to Master WordPress Shortcodes ).

You can pass a lot of parameters (not just language parameter) to the sourcecode Shortcode. A full list of parameters that can be passed are listed in the WordPress.com support page.

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Related posts: