9 practical JavaScript code highlighting scripts

Source: Internet
Author: User

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.

Original article: webdesignbooth
Translation: ued163

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.