
Prism is a new lightweight, extensible syntax highlighter, built with modern web standards in mind. It’s a spin-off from Dabblet and is tested there daily by thousands.
Features:
- Each language definition adds roughly 300-500 bytes.
- Prism forces you to use the correct element for marking up code:
<code>
. On its own for inline code, or inside a <pre> for blocks of code. In addition, the language is defined through the way recommended in the HTML5 draft: through a language-xxxx class. - upports parallelism with Web Workers, if available.
- Very easy to extend without modifying the code, due to Prism’s plugin architecture.
- Very easy to define new languages. Only thing you need is a good understanding of regular expressions
- All styling is done through CSS, with sensible class names rather than ugly namespaced abbreviated nonsense.
- Wide browser support: IE9+, Firefox, Chrome, Safari, Opera, most Mobile browsers
- Highlights embedded languages (e.g. CSS inside HTML, JavaScript inside HTML)
- Highlights nested languages (CSS in HTML, JavaScript in HTML)