9 useful JavaScript code highlighting scripts

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.