Wednesday, January 20, 2016

SYNTAX HIGHLIGHTER: Display Beautifully The Sourcecodes in Blogger

My blog is about code snippets related to programming such as php, sql, javascript, etc. So I need to highlight my codes to make it different from other contents. I've added a syntax highlighter to do it.

Put the code below before the closing head</head> section of your template.


 















It can support javascript, php, C++, C Sharp, Python, Ruby, Sql, CSS, Java, VB, XML and Perl.
To be able to used it, enclose your code with

<pre class="brush:JScript">....your code here...</pre>

Sample Output







Example Code in Java
public class HelloWorld
{
public static void main(String[] args) {
System.out.println("Hello World!");
}
}

Classes for different language:
Java = brush:java
Javascript = brush:jscript/javascript/js
CSS = brush:css
C++ = brush:cpp/c
C# = brush:c-sharp/csharp
php= brush:php
Python = brush:python
Ruby = brush:ruby
Sql= brush:sql
Visual Basic = brush:vb
XML = brush:xml
Perl = brush:perl

SYNTAX HIGHLIGHTER: Display Beautifully The Sourcecodes in Blogger

SYNTAX HIGHLIGHTER: Display Beautifully The Sourcecodes in Blogger Rating: 4.5 Diposkan Oleh: Emoblazz

0 comments:

Post a Comment