Syntax highlighting using SHJS

SHJS is a JavaScript program which highlights source code passages in HTML documents. Documents using SHJS are highlighted on the client side by the web browser. In the head element of your document, include the sh_main.js script and the script for the programming language you are using. (If you have multiple languages in the same Continue Reading

Syntax highlighting using Rainbow

Rainbow is syntax highlighting library written in Javascript. It is lightweight and primary focused on syntax highlighting for programming languages. It is easy to use and easy customization is possible. It is also easily themable using CSS. To use the rainbow syntax highlighter, download it in your local server and link it to your webpage. Continue Reading

Syntax highlighting using Highlight JS

HighlightJS library offers syntax highlighting for over 170 languages. It can provide many attractive styles . The bare minimum for using highlight.js on a web page is linking to the library along with one of the styles and calling initHighlightingOnLoad: <link href=”styles/arta.css” rel=”stylesheet” type=”text/css” /> <script src=”highlight.pack.js” type=”text/javascript”></script> <script type=”text/javascript”> hljs.initHighlightingOnLoad() </script> To add a Continue Reading