Highlight.js is a syntax highlighter written in JavaScript. It works in the browser as well as on the server. It can work with pretty much any markup, doesn’t depend on any other frameworks, and has automatic language detection. Highlight.js supports over 180 languages in the core library. There are also 3rd party language definitions available to support even more languages. We strongly recommend <pre><code> wrapping for code blocks. It's quite semantic and "just works" out of the box with zero fiddling. It is possible to use other HTML elements (or combos), but you may need to pay special attention to preserving linebreaks. You can run highlighting inside a web worker to avoid freezing the browser window while dealing with very big chunks of code.

Features

  • 197 languages and 248 styles
  • Automatic language detection
  • Multi-language code highlighting
  • Available for node.js
  • Works with any markup
  • Compatible with any js framework

Project Samples

Project Activity

See All Activity >

Categories

Code Review

License

BSD License

Follow Highlight.js

Highlight.js Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Highlight.js!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Code Review Software

Registered

2023-03-10