Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax highlighting code with Javascript [closed]

What Javascript libraries can you recommend for syntax highlighting <code> blocks in HTML?

(One suggestion per answer please).

like image 317
mlambie Avatar asked Oct 02 '08 02:10

mlambie


People also ask

What does Github use for syntax highlighting?

We use Linguist to perform language detection and to select third-party grammars for syntax highlighting. You can find out which keywords are valid in the languages YAML file.

How do you highlight HTML code?

The HTML <mark> tag is used to mark or highlight text that is of special interest or relevance in an HTML document. Browsers traditionally render the text found within the <mark> tag as text with a yellow background color. This tag is also commonly referred to as the <mark> element.

What is PrismJS used for?

Syntax Highlighting with PrismJS Prism is a lightweight, extensible syntax highlighter that can be used when working with code blocks in markdown files in blog posts.


1 Answers

StackOverflow uses the Prettify library.

like image 114
AaronSieb Avatar answered Sep 20 '22 17:09

AaronSieb