Code highlighting is useful, especially when you need to display your own code on a website or blog, or when you want to view or debug syntax errors for others. We can highlight the code so that readers can easily read the code block and improve the user's good experience in reading the code.
Currently, there are many free and usefulCode highlightingScript. These scripts are mostly written in Javascript, and some are written in other languages (such as java, Phyton, or Ruby.
We recommend the most popular and practical9 Javascript code highlighting scripts.
1. SyntaxHighlighter
I believe this is the most common code highlight code. It supports multiple languages, and if the language you use is not supported by default, you can easily create a new "brush ".
2. SHJS
SHJS is short for Syntax Highlighting in Javascript. It comes from the GNU source code highlighted language. And supports many programming languages. SHJS supports mainstream browsers such as Firefox 2 +, IE 6 +, Opera 9.6 +, Safari 3.2, and Chrome 1.0 +.
3. beautyOfCode
BeautyOfCode is a jQuery code highlight plug-in. It uses SyntaxHighlighter scripts and makes them better compatible with XHTML.
4. Chili
Chili is a jQuery code highlighting plug-in. It is bundled with support in many languages and supports multiple setting options.
5. Lighter. js
Lighter. js is a free MooTools code highlighting plug-in. Using lighter. js is as simple as simply adding a simple script to your page.
6. Highlight. js
Highlight. js is a very easy-to-use highlight script that supports multiple programming languages. It also has some useful plug-ins that can be easily deployed to other CMS, forums, or blogs.
7. DlHighlight
DlHighlight is a simple code highlighting script that supports only four programming languages: JavaScript, CSS, XML, and HTML.
8. Google Code pret.pdf
Google Code Prettify has a JavaScript model and CSS file that supports syntax highlighting on HTML pages.
9. JUSH
JUSH is another jQuery syntax highlighting plug-in that supports multiple programming languages, such as HTML, CSS, PHP, PY, and SQL.
In short, it is a wise choice for developers to add several highlighted code scripts.