Syntax highlighting is a feature of text editors that displays text, especially source code , in different colors and fonts according to the category of terms. This feature facilitates writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it is intended only for human readers.
Syntax highlighting also helps programmers find errors in their program. For example, most editors highlight string literals in a different color. Consequently, spotting a missing delimiter is much easier because of the contrasting color of the text.
There are various syntax highlighters which can format codes and color them appropriately according to the languages used. Whether it is a HTML page or runs on PHP, Ruby, Python or ASP. Here in this article, we are showcasing 15 best syntax code highlighter to help you present to your code snippets in a more fascinating way. Enjoy!
Prism is a lightweight (1.5KB minified & gzipped), extensible syntax highlighter, built with modern web standards in mind. All styling is done through CSS, with sensible class names like .comment, .string, .property etc.
GeSHi is a simple but powerful highlighting class. It supports PHP5 and Windows, and has even been used to highlight code on ASP pages. Numerous blogs, wikis and forums use GeSHi, including Dokuwiki, Mambo, phpBB and WikkaWiki.
This online highlighter tool offers many coding languages you can choose to highlight together with several options, you can check/uncheck before highlighting code.
Google Code Prettify
Snippet is a jQuery syntax highlighting plugin built on top of the SHJS script found on SourceForge. Snippet provides a quick and easy way of highlighting source code passages in HTML documents. It natively supports 15 popular languages and features 39 unique color schemes.
JUSH is available also as jQuery and WordPress plugin.
Chili is the jQuery code highlighter plugin which is very fast highlighting, trivial setup, fully customizable, thoroughly documented and MIT licensed.
Pygments is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Pygments support a wide range of common languages, and a number of output formats is available, among them HTML, RTF, LaTeX and ANSI sequences.
Ultraviolet is a syntax highlighting engine based on Textpow. Since it uses Textmate syntax files, it offers out of the box syntax highlighting for more than 50 languages and 20 themes.
Lighter is a free syntax highlighting class developed for MooTools. Using it can be as simple as adding a single script to your webpage, selecting the elements you wish to highlight, and Lighter takes care of the rest. It is currently in use on the MooTools forge so you are seeing it in action right there.
This jQuery syntax highlighter plugin uses Alex Gorbatchev’s SyntaxHighlighter, but this plugin enables xhtml compliant syntax.
SyntaxHighlighter allow insertion of colored code snippets on a web page without relying on any server side scripts and isn’t for those looking for ability to edit highlighted code.
*Please confirm the email sent to your inbox after clicking "Sign Up!".