2016 's hottest 15 code syntax highlighting tool to beautify your code _javascript tips

Source: Internet
Author: User
Tags mootools

Objective:

Code highlighting is useful, especially when you need to display your own code in a Web site or blog, or when you are viewing or debugging a grammar error. We can highlight the code so that the reader can easily read the code block and increase the user's good experience in reading the code.

Syntax highlighting is used by text editors to display text, especially source code, which is displayed in different colors and fonts according to different categories. This feature helps to write structured languages, such as programming languages, markup languages, and the syntax errors displayed by these languages are different. Grammar highlighting does not affect the meaning of the text itself, but it is good for people's reading habits.

At present, there are a lot of free and useful code highlighting scripts. Most of these scripts are written in JavaScript language and some 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 many different languages, and if you use a language that is not supported by default, you can simply create a new "brush".


2. Shjs

SHJS is a shorthand for syntax highlighting in JavaScript. It comes from the GNU source highlighting language. and supports a wide variety 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 bundles a number 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 to simply 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 very 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 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.


The above gives you summed up nine more practical JavaScript code highlighting script, in short, according to their own needs, choose the right one.

Here to share 15 code syntax highlighting tools to beautify your code

Syntax highlighting is used by text editors to display text, especially source code, which is displayed in different colors and fonts according to different categories. This feature helps to write structured languages, such as programming languages, markup languages, and the syntax errors displayed by these languages are different. Grammar highlighting does not affect the meaning of the text itself, but it is good for people's reading habits.

Syntax highlighting can also help developers quickly find bugs in their programs. For example, most editors use different colors to highlight string constants. So it's very easy to see if the separator is missing because it's different than the other text colors.

There are a variety of syntax highlighting tools that can be formatted and highlighted according to different programming languages. Whether it's an HTML page or a php,ruby,python or an ASP. In this article, we'll introduce the 15 best code syntax highlighting tools to help you show code snippets in a more fascinating way. enjoy!

Prism

Prism is a lightweight, extensible syntax coloring tool that conforms to WEB standards. It is compressed only 1.5KB, and very easy to use, only need to insert a CSS and JS file.

GeSHi

GeSHi (Generic Syntax highlighter) is used to highlight various source code in an HTML page. Supports more than 60 languages: PHP, HTML, C, Java, Java5, C #, Actionscript, Delphi, C + +, Groovy, Javascript, Perl, Pl/sql, Ruby, Python, SQL, XML, etc. It is easily integrated into systems such as dokuwiki,mambo,phpbb,wordpress and WikkaWiki.

Rainbow

Rainbow is a lightweight JavaScript library with syntax coloring of code that is only 1.4kb in size. Easy to use, extensible, and completely CSS-style display. Full support for CSS themes custom colors and fonts.


Highlight.js

Highlight.js is a JS project that is used to render various sample source code syntax on any Web page. Supports 26 types of code formatting styles, 54 languages: –1C, AVR assembler, Apache, Axapta, Bash, C #, C + +, CSS, DOS. bat, Delphi, Django, HTML, XML, Ini, Java, Javascript, Lisp, MEL (Maya Embedded Language), PHP, Perl, Python, Python profile, RenderMan (RIB, RSL), Ruby, SQL, Smalltalk, VBScript, other more.

Quick Highlighter

This is the online Code highlighting tool, providing a variety of programming language highlighting, users can use a number of options for different categories of code highlighting.

Google Code prettify

This is a JavaScript module and CSS file that allows you to highlight source code syntax in an HTML file. It supports embedded links, line numbers, and so on in your code. It is widely used and is supported across browsers. Get the unanimous approval of code.google.com and stackoverflow.com.

Snippet

Snippet is a jQuery syntax highlighting plug-in, built in the Shjs script. Snippet provides a quick and easy way to highlight code in HTML documents. It natively supports 15 popular languages and supports 39 unique syntax highlighting style patterns.

Codepress

Codepress is a web-based source code editor that enables real-time code highlighting when writing Javascriptis code in a browser.

JavaScript Syntax Highlighter

JavaScript Syntax Highlighter is a client-side code highlighting tool that supports languages such as HTML, CSS, JavaScript, PHP, SQL, HTTP and SMTP protocols, php.ini and Apache configurations that support all primary Streaming browsers: Internet Explorer, Firefox, Opera and Google Chrome. Jush is also a jQuery and WordPress plugin.

Chili

Chili is a jQuery code highlighting plugin that allows for quick code highlighting, very simple, fully customizable, and has a complete document.
The languages supported by this plugin are: C + +, C #, CSS, Delphi, Java, JavaScript, LotusScript, MySQL, PHP, xhtm; browsers supported: Internet Explorer, Firefox, Ope RA and Safari.


Pygments

Pygments is a common code syntax highlighting tool, and many commonly used software uses this tool, such as forum systems, wikis, or other applications that need to beautify the code. Pygments supports a very wide range of programming languages, and a large number of output formats, including HTML, RTF, LaTeX, and ANSI sequences.


Ultraviolet

Ultraviolet is a TEXTPOW-based code syntax highlighting engine. Since using the TextMate syntax highlighting file, you can support syntax highlighting in more than 50 languages and 20 different themes, and it's out-of-the-box.

Lighter

Lighter is a free mootools code highlighting plugin. It's OK to use lighter.js to simply add a simple script to your page.

Beautyofcode

This is a jQuery syntax highlighting plugin that uses Alex Gorbatchev's syntaxhighlighter, but this plugin is compatible with XHTML syntax.


Syntaxhighlighter

Syntaxhighlighter is a full-featured stand-alone code syntax highlighting tool that is written using JavaScript. It has been unanimously approved by Apache, Aptana, Mozilla, Yahoo, Wordpress, Bug Labs, FreshBooks, and is in use.
Syntaxhighlighter allows you to insert color snippets on Web pages without relying on any server-side scripting.

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.