Home >Web Front-end >HTML Tutorial >Share 15 code syntax shaders that beautify source code_html/css_WEB-ITnose

Share 15 code syntax shaders that beautify source code_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:04:211421browse

Syntax highlighting is used by text editors to display text, especially source code, in different colors and fonts according to different categories. This feature is helpful for writing structured languages, such as programming languages ​​and markup languages. The syntax error display of these languages ​​is different. Syntax highlighting does not affect the meaning of the text itself, and can well conform to people's reading habits.

Syntax highlighting can also help developers quickly find errors in their programs. For example, most editors will highlight string constants in different colors. So, it's very easy to spot if a separator is missing because it's a different color relative to the rest of the text.

There are now a variety of syntax highlighting tools that can format languages ​​and highlight them according to different programming languages. Whether it's an HTML page or PHP, Ruby, Python or ASP. In this article, we will introduce 15 of the best code syntax highlighting tools to help you display code snippets in a more charming way. Enjoy!

Prism

Prism is a lightweight, extensible syntax coloring tool that complies with web standards. It's only 1.5KB gzipped and is very easy to use, requiring only the insertion of a CSS and JS file.

GeSHi

GeSHi (Generic Syntax Highlighter) is used to highlight various source codes in HTML pages. Supports more than 60 languages: PHP, HTML, C, Java, Java5, C#, Actionscript, Delphi, C, Groovy, Javascript, Perl, PL/SQL, Ruby, Python, SQL, XML, etc., and is easily integrated into Dokuwiki, Mambo , used in systems such as phpBB, WordPress and WikkaWiki.



Rainbow

Rainbow is a lightweight JavaScript library for syntax coloring of code, only 1.4kb in size . Easy to use, extensible, and fully styled via CSS. Full support for CSS theme custom colors and fonts.


Highlight.js

Highlight.js is a JS project for colorizing various sample source code syntax on any web page. Supports 26 code formatting styles and 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, and more.



Quick Highlighter

This is an online code highlighting tool that provides highlighting in multiple programming languages. Users have several options for different categories of code highlighting.



Google Code Prettify

This is a JavaScript module and CSS file that allows sourcing in one HTML file Syntax highlighting of code. It supports embedded links in code, line numbers and more. It has a wide range of applications and supports cross-browser support. Endorsed by code.google.com and stackoverflow.com.



Snippet

Snippet is a jQuery syntax highlighting plugin built in SHJS scripts. Snippet provides a quick and easy way to perform code highlighting on HTML documents. It natively supports 15 popular languages ​​and supports 39 unique syntax highlighting style modes.



CodePress

CodePress is a web-based source code editor for writing JavaScriptis code in the browser Code highlighting can be performed in real time.



JavaScript Syntax Highlighter

JavaScript Syntax Highlighter is a client-side code highlighting tool. Supported languages ​​are: HTML , CSS, JavaScript, PHP, SQL, HTTP and SMTP protocols, php.ini and Apache configuration, supports all major browsers: Internet Explorer, Firefox, Opera and Google Chrome. JUSH is also a jQuery and WordPress plugin.



Chili
Chili is a jQuery code highlighting plug-in that can quickly highlight code. It is very simple to set up and completely customizable. Has complete documentation.
The languages ​​supported by this plug-in are: C, C#, CSS, Delphi, Java, JavaScript, LotusScript, MySQL, PHP, XHTM; the supported browsers are: Internet Explorer, Firefox, Opera and Safari.



Pygments

Pygments is a universal code syntax highlighting tool. This tool is used by many commonly used software, such as forums Systems, wikis or other applications that need to beautify 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 code syntax highlighting engine based on Textpow. Since using the Textmate syntax highlighting file, it can support syntax highlighting in more than 50 languages ​​​​and 20 different themes, and it is available out of the box.



Lighter

Lighter is a free MooTools code highlighting plug-in. Using lighter.js is as simple as adding a simple script to your page.



beautyOfCode

This is a jQuery syntax highlighting plug-in, using Alex Gorbatchev's SyntaxHighlighter, but this plug-in is compatible with xhtml syntax.



SyntaxHighlighter

SyntaxHighlighter is a fully functional independent code syntax highlighting tool written in JavaScript. It has been unanimously recognized and used by Apache, Aptana, Mozilla, Yahoo, Wordpress, Bug Labs, Freshbooks.
SyntaxHighlighter allows inserting colored code snippets into web pages without relying on any server-side scripts.

From: realcombiz.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn