Code highlighting is useful, especially if you need to display your own code in a website or blog, or when you want to see or debug a syntax error for someone else. We can highlight the code so that the reader can easily read the code block and increase the user's good experience of reading the code.
Currently, there are many free and useful code highlighting scripts. Most of these scripts are written in the JavaScript language, or in other languages such as Java, Phyton, or Ruby.
The most popular and practical 9 JavaScript code highlighting scripts are recommended below.
1. Syntaxhighlighter
I believe this is the most common code highlighting code. It supports a variety of different languages, and if you use a language that is not supported by default, you can easily create a new "brush".
2. Shjs
SHJS is shorthand for syntax highlighting in JavaScript. It comes from the GNU source highlighting language. and supports a number of programming languages. Tested SHJS supports mainstream browsers such as Firefox, IE 6+, Opera 9.6+, Safari 3.2 and Chrome 1.0+.
3. Beautyofcode
Beautyofcode is a jquery code highlighting plugin. It uses syntaxhighlighter scripts and makes them better compatible with XHTML.
4. Chili
Chili is a jquery code highlighting plugin. It is bundled with a variety of language support and supports multiple settings options.
5.lighter.js
Lighter.js is a free mootools code highlighting plugin. It's OK to use lighter.js simply to add a simple script to your page.
6. Highlight.js
Highlight.js is a very easy-to-use highlighting script that supports a variety of programming languages. It also has some useful plugins that can be easily deployed to other CMS, forums, or blogs.
7 . Dlhighlight
Dlhighlight is a simple code highlighting script that supports only 4 programming languages: JavaScript, CSS, XML, HTML.
8. Google Code prettify
Google Code Prettify has a JavaScript model and CSS file that supports syntax highlighting in HTML pages.
9. Jush
Jush is another jquery syntax highlighting plugin that supports a variety of programming languages, such as HTML, CSS, PHP, PY, and SQL.
In short, the collection of several code highlighting of the script for the development of Friends is a wise choice.
9 useful JavaScript code highlighting scripts