Sunday, July 29, 2012

Syntax Highlight for Blogger



Content of this blog contain source code of programming language, like XML & Java. For ease of reading, they are well formatted by SyntaxHighlighter .

The following described how to implement SyntaxHighlighter in Blogger.com

1. Login Blogger > Template > Edit HTML > Proceed







2. Copy & Paste the following code, just before </Head>. Then Save template. After that, Blogger template setup is completed









2. To add formatted code in to your Blogger, use wrap the content with the following tag.

 

 



You also get to edit the content by HTML as below.



The above example is for XML content. For other like Java, PHP, etc, see the table below

Here's a list of supported languages and their aliases:
Language Aliases
C++ cpp, c, c++
C# c#, c-sharp, csharp
CSS css
Delphi delphi, pascal
Java java
Java Script js, jscript, javascript
PHP php
Python py, python
Ruby rb, ruby, rails, ror
Sql sql
VB vb, vb.net
XML/HTML xml, html, xhtml, xslt

Please also check with SyntaxHighlighter website for other info.

SyntaxHighlighter in Google Code
SyntaxHighlighter web site




































No comments:

Post a Comment