It is always suggestible for the author to write posts in very attractive and beautiful way so that the reading ability and enthusiasm of the visitor remains live. In this post I will explain how the procedure to highlight codes( Whether it may be CSS, PHP, Java, HTML…) in different colours. There were lots of plugins for wordpress which serves the purpose but here I am choosing Syntax Highlighter WordPress Plugin. Just Follow the simple instructions and you can play in colours with codes.

1. First download Syntax Highlighter WordPress Plugin.

2. Now install the plugin and activate it. ( To know How to install WordPress plugin, just check this post)

3. Now create the code you wish to post

<pre class="brush:[code-alias]"> …Your Code Here </pre>

replace the "[Code-alias]" segment with the type of code you have. You can see all the available brush alias here.

For Example a C# code will look like this:

Hello1.cs

public class Hello1

{

public static void Main()

{

System.Console.WriteLine("Hello, World!");

}

}

The screenshot to see how this plugin highlight’s your codes is attached for your reference.HTML Code highlighter

Subscribe to the post comments feeds or Leave a trackback