Skip to main content
Rerun the script now that Julia has been added https://meta.stackexchange.com/a/400963
Source Link
zcoop98
  • 10k
  • 3
  • 26
  • 58
  • Plain text: lang-plaintext, lang-none, (lang-text, lang-txt)
    (explicitly disables syntax highlighting)
  • Bash and other shell scripts: lang-bash, lang-bsh, lang-csh, lang-sh
  • C and C-likes: lang-c, lang-cyc, lang-m, lang-c-like, (lang-h)
  • Clojure: lang-clojure, lang-clj, (lang-edn)
  • CoffeeScript: lang-coffeescript, lang-coffee, (lang-cson, lang-iced)
  • C++: lang-cpp, lang-cc, lang-cxx, (lang-c++, lang-h++, lang-hpp, lang-hh, lang-hxx)
  • C#: lang-csharp, lang-cs, (lang-c#)
  • CSS: lang-css
  • Dart: lang-dart
  • Delphi, Pascal: lang-delphi, (lang-dpr, lang-dfm, lang-pas, lang-pascal)
  • Erlang: lang-erlang, lang-erl
  • Go: lang-go, (lang-golang)
  • Haskell: lang-haskell, lang-hs
  • HTTP request/​response: lang-http, (lang-https)
  • INI, TOML: lang-ini, (lang-toml)
  • Java: lang-java, (lang-jsp)
  • JavaScript: lang-javascript, lang-js, (lang-jsx, lang-mjs, lang-cjs)
  • JSON: lang-json
  • Julia: lang-julia
  • Kotlin: lang-kotlin, (lang-kt, lang-kts)
  • LaTeX, TeX: lang-latex, lang-tex
  • Less: lang-less
  • Lisp: lang-lisp, lang-cl, lang-el, lang-lsp
  • Lua: lang-lua
  • Makefile: lang-makefile, (lang-mk, lang-mak, lang-make)
  • Markdown: lang-markdown, (lang-md, lang-mkdown, lang-mkd)
  • Mathematica / Wolfram Language: lang-mathematica, lang-mma, (lang-wl)
    (Mathematica SE only)
  • MATLAB: lang-matlab
  • Objective-C: lang-objectivec, (lang-mm, lang-objc, lang-obj-c, lang-obj-c++, lang-objective-c++)
  • OCaml, F#, SML and other ML-family languages: lang-ocaml, lang-fs, lang-ml
  • Perl: lang-perl, lang-pl, (lang-pm)
  • PHP: lang-php
  • PHP template (HTML+PHP): lang-php-template
  • Protocol Buffers: lang-protobuf, (lang-proto)
  • Python: lang-python, lang-py, lang-cv, (lang-gyp, lang-ipython)
  • R, S: lang-r, lang-s
  • Ruby: lang-ruby, lang-rb, (lang-gemspec, lang-podspec, lang-thor, lang-irb)
  • Rust: lang-rust, lang-rc, lang-rs
  • Scala: lang-scala
  • Scheme, Racket: lang-scheme, lang-scm, lang-ss, lang-rkt
  • SCSS: lang-scss
  • Shell session: lang-shell, (lang-console, lang-shellsession)
  • SQL: lang-sql
  • Swift: lang-swift
  • TypeScript: lang-typescript, (lang-ts, lang-tsx, lang-mts, lang-cts)
  • Visual Basic (.NET), VBScript: lang-vbnet, lang-vb, lang-vbs
  • VHDL: lang-vhdl, lang-vhd
  • XML, HTML and their derivatives: lang-xml, lang-html, lang-xsl, (lang-xhtml, lang-rss, lang-atom, lang-xjb, lang-xsd, lang-plist, lang-wsf, lang-svg)
  • YAML: lang-yaml, (lang-yml)
  • Plain text: lang-plaintext, lang-none, (lang-text, lang-txt)
    (explicitly disables syntax highlighting)
  • Bash and other shell scripts: lang-bash, lang-bsh, lang-csh, lang-sh
  • C and C-likes: lang-c, lang-cyc, lang-m, lang-c-like, (lang-h)
  • Clojure: lang-clojure, lang-clj
  • CoffeeScript: lang-coffeescript, lang-coffee, (lang-cson, lang-iced)
  • C++: lang-cpp, lang-cc, lang-cxx, (lang-c++, lang-h++, lang-hpp, lang-hh, lang-hxx)
  • C#: lang-csharp, lang-cs, (lang-c#)
  • CSS: lang-css
  • Dart: lang-dart
  • Delphi, Pascal: lang-delphi, (lang-dpr, lang-dfm, lang-pas, lang-pascal)
  • Erlang: lang-erlang, lang-erl
  • Go: lang-go, (lang-golang)
  • Haskell: lang-haskell, lang-hs
  • HTTP request/​response: lang-http, (lang-https)
  • INI, TOML: lang-ini, (lang-toml)
  • Java: lang-java, (lang-jsp)
  • JavaScript: lang-javascript, lang-js, (lang-jsx, lang-mjs, lang-cjs)
  • JSON: lang-json
  • Kotlin: lang-kotlin, (lang-kt, lang-kts)
  • LaTeX, TeX: lang-latex, lang-tex
  • Less: lang-less
  • Lisp: lang-lisp, lang-cl, lang-el, lang-lsp
  • Lua: lang-lua
  • Makefile: lang-makefile, (lang-mk, lang-mak, lang-make)
  • Markdown: lang-markdown, (lang-md, lang-mkdown, lang-mkd)
  • Mathematica / Wolfram Language: lang-mathematica, lang-mma, (lang-wl)
    (Mathematica SE only)
  • MATLAB: lang-matlab
  • Objective-C: lang-objectivec, (lang-mm, lang-objc, lang-obj-c, lang-obj-c++, lang-objective-c++)
  • OCaml, F#, SML and other ML-family languages: lang-ocaml, lang-fs, lang-ml
  • Perl: lang-perl, lang-pl, (lang-pm)
  • PHP: lang-php
  • PHP template (HTML+PHP): lang-php-template
  • Protocol Buffers: lang-protobuf
  • Python: lang-python, lang-py, lang-cv, (lang-gyp, lang-ipython)
  • R, S: lang-r, lang-s
  • Ruby: lang-ruby, lang-rb, (lang-gemspec, lang-podspec, lang-thor, lang-irb)
  • Rust: lang-rust, lang-rc, lang-rs
  • Scala: lang-scala
  • Scheme, Racket: lang-scheme, lang-scm, lang-ss, lang-rkt
  • SCSS: lang-scss
  • Shell session: lang-shell, (lang-console, lang-shellsession)
  • SQL: lang-sql
  • Swift: lang-swift
  • TypeScript: lang-typescript, (lang-ts, lang-tsx)
  • Visual Basic (.NET), VBScript: lang-vbnet, lang-vb, lang-vbs
  • VHDL: lang-vhdl, lang-vhd
  • XML, HTML and their derivatives: lang-xml, lang-html, lang-xsl, (lang-xhtml, lang-rss, lang-atom, lang-xjb, lang-xsd, lang-plist, lang-wsf, lang-svg)
  • YAML: lang-yaml, (lang-yml)
  • Plain text: lang-plaintext, lang-none, (lang-text, lang-txt)
    (explicitly disables syntax highlighting)
  • Bash and other shell scripts: lang-bash, lang-bsh, lang-csh, lang-sh
  • C and C-likes: lang-c, lang-cyc, lang-m, lang-c-like, (lang-h)
  • Clojure: lang-clojure, lang-clj, (lang-edn)
  • CoffeeScript: lang-coffeescript, lang-coffee, (lang-cson, lang-iced)
  • C++: lang-cpp, lang-cc, lang-cxx, (lang-c++, lang-h++, lang-hpp, lang-hh, lang-hxx)
  • C#: lang-csharp, lang-cs, (lang-c#)
  • CSS: lang-css
  • Dart: lang-dart
  • Delphi, Pascal: lang-delphi, (lang-dpr, lang-dfm, lang-pas, lang-pascal)
  • Erlang: lang-erlang, lang-erl
  • Go: lang-go, (lang-golang)
  • Haskell: lang-haskell, lang-hs
  • HTTP request/​response: lang-http, (lang-https)
  • INI, TOML: lang-ini, (lang-toml)
  • Java: lang-java, (lang-jsp)
  • JavaScript: lang-javascript, lang-js, (lang-jsx, lang-mjs, lang-cjs)
  • JSON: lang-json
  • Julia: lang-julia
  • Kotlin: lang-kotlin, (lang-kt, lang-kts)
  • LaTeX, TeX: lang-latex, lang-tex
  • Less: lang-less
  • Lisp: lang-lisp, lang-cl, lang-el, lang-lsp
  • Lua: lang-lua
  • Makefile: lang-makefile, (lang-mk, lang-mak, lang-make)
  • Markdown: lang-markdown, (lang-md, lang-mkdown, lang-mkd)
  • Mathematica / Wolfram Language: lang-mathematica, lang-mma, (lang-wl)
    (Mathematica SE only)
  • MATLAB: lang-matlab
  • Objective-C: lang-objectivec, (lang-mm, lang-objc, lang-obj-c, lang-obj-c++, lang-objective-c++)
  • OCaml, F#, SML and other ML-family languages: lang-ocaml, lang-fs, lang-ml
  • Perl: lang-perl, lang-pl, (lang-pm)
  • PHP: lang-php
  • PHP template (HTML+PHP): lang-php-template
  • Protocol Buffers: lang-protobuf, (lang-proto)
  • Python: lang-python, lang-py, lang-cv, (lang-gyp, lang-ipython)
  • R, S: lang-r, lang-s
  • Ruby: lang-ruby, lang-rb, (lang-gemspec, lang-podspec, lang-thor, lang-irb)
  • Rust: lang-rust, lang-rc, lang-rs
  • Scala: lang-scala
  • Scheme, Racket: lang-scheme, lang-scm, lang-ss, lang-rkt
  • SCSS: lang-scss
  • Shell session: lang-shell, (lang-console, lang-shellsession)
  • SQL: lang-sql
  • Swift: lang-swift
  • TypeScript: lang-typescript, (lang-ts, lang-tsx, lang-mts, lang-cts)
  • Visual Basic (.NET), VBScript: lang-vbnet, lang-vb, lang-vbs
  • VHDL: lang-vhdl, lang-vhd
  • XML, HTML and their derivatives: lang-xml, lang-html, lang-xsl, (lang-xhtml, lang-rss, lang-atom, lang-xjb, lang-xsd, lang-plist, lang-wsf, lang-svg)
  • YAML: lang-yaml, (lang-yml)
deleted 36 characters in body
Source Link

While it's fine to request for the SE team to add additional supported languagesHowever, thesedo note that requests for supporting more languages are extremely likely to be considered low-priority and as such deferred. The current response for such feature requests is that the team finds that the added trade-offs from supporting more languages outweigh their potential benefit, though they're looking for future ways to lighten it.

You can specify any tag that exists on the site, and Stack Exchange will use whatever language hint is currently associated with that tag to highlight the code block (which can be either null (no hint, no syntax highlighting), default (automatic language detection), or a specific language code). Keep in mind that by default all tags start off with null as their language hint!.

While it's fine to request for the SE team to add additional supported languages, these requests are extremely likely to be considered low-priority and as such deferred. The current response for such feature requests is that the team finds that the added trade-offs from supporting more languages outweigh their potential benefit, though they're looking for future ways to lighten it.

You can specify any tag that exists on the site, and Stack Exchange will use whatever language hint is currently associated with that tag to highlight the code block (which can be either null (no hint, no syntax highlighting), default (automatic language detection), or a specific language code). Keep in mind that by default all tags start off with null as their language hint!

However, do note that requests for supporting more languages are extremely likely to be considered low-priority and as such deferred. The current response for such feature requests is that the team finds that the added trade-offs from supporting more languages outweigh their potential benefit, though they're looking for future ways to lighten it.

You can specify any tag that exists on the site, and Stack Exchange will use whatever language hint is currently associated with that tag to highlight the code block (which can be either null (no hint, no syntax highlighting), default (automatic language detection), or a specific language code). Keep in mind that by default all tags start off with null as their language hint.

added 395 characters in body
Source Link

In case of a tag name, make sure to also specify it in lower case. See How do I use syntax highlighting? section below for more info.

Not all languages supported by highlight.js are supported on Stack Exchange. See Language codes currently available on Stack Exchange section below for the list of supported languages. If your language is not on the list, whether or not it is otherwise supported by highlight.js, follow the instructions in How do I report a bug or request a new language? section below.

3. Check that the tags on a question have an associatedis using exactly one tag with a highlighting language codesspecified

By default, Stack Exchange uses the tags on a question to determine the language you are using. If there's more than one tag that has a highlighting language specified, it lets highlight.js infer what's the best language to use. If none of the tags have one, no syntax highlighting will be performed. The same highlighting language that is used on a question isquestion's tags are also used onto determine the default syntax highlighting language for its answers.

This is a complete list of every identifier that you can use in a language hint for syntax highlighting. All the language identifiers in each group point to the same highlighter. Other language aliases set by highlight.js (in bracketsparentheses) should work, but only identifiers before them are officially supported by Stack Exchange.

Note that, as mentioned before, this is a subset of all languages supported by highlight.js.

Any language identifiers used in a post that go unrecognized by highlight.js, are for languages that are not deployed on Stack Exchange, or are for tags that do not have a language hint specified in their data will be ignored and will trigger an automatic language detection.

Note to editors:

Please do not edit the above list manually.

  • Just because you type something in and it looks like it's highlighted correctly does not mean the identifier actually exists in the system. Keep in mind that invalid identifiers trigger an automatic language detection.
  • Not all the languages supported by highlight.js are available everywhere. The set of languages available depends on how the library is built or included.
  • Additionally, This means that several languages that are indicated as supported in highlight.js's documentation may alsothe above linked list are not be supported by Stack ExchangeExchange's version of highlight.js, as they are in separate modules which mayhave not bebeen deployed on Stack Exchange.

Because of these points, to update the list please use the script it was generated with and link to this script (or another Meta post which confirms an identifier's existence) in your edit summary.

Note to commenters:

The comments on this FAQ are for requesting clarification of something you might not understand in the FAQ so that it can be fixed. Please DO NOT ask if certain languages will be supported in the future. Follow the instructions in How do I report a bug or request a new language? section to request language support.

In case of a tag name make sure to also specify it in lower case. See How do I use syntax highlighting? section below for more info.

See Language codes currently available on Stack Exchange section below. If your language is not on the list, follow the instructions in How do I report a bug or request a new language? section below.

3. Check that the tags on a question have an associated language codes

By default, Stack Exchange uses the tags on a question to determine the language you are using. If there's more than one tag that has a highlighting language specified, it lets highlight.js infer what's the best language to use. If none of the tags have one, no syntax highlighting will be performed. The same highlighting language that is used on a question is also used on its answers.

This is a complete list of every identifier that you can use in a language hint for syntax highlighting. All the language identifiers in each group point to the same highlighter. Other language aliases set by highlight.js (in brackets) should work, but only identifiers before them are officially supported by Stack Exchange.

Any language identifiers used in a post that go unrecognized by highlight.js will be ignored and will trigger an automatic language detection.

Note to editors:

Please do not edit the above list manually.

  • Just because you type something in and it looks like it's highlighted correctly does not mean the identifier actually exists in the system. Keep in mind that invalid identifiers trigger an automatic language detection.
  • Not all the languages supported by highlight.js are available everywhere. The set of languages available depends on how the library is built or included.
  • Additionally, several languages that are indicated as supported in highlight.js's documentation may also not be supported by Stack Exchange version of highlight.js, as they are in separate modules which may not be deployed on Stack Exchange.

Because of these points, to update the list please use the script it was generated with and link to this script (or another Meta post which confirms an identifier's existence) in your edit summary.

Note to commenters:

The comments on this FAQ are for requesting clarification of something you might not understand in the FAQ so that it can be fixed. Please DO NOT ask if certain languages will be supported in the future. Follow the instructions in How do I report a bug or request a new language? section to request language support.

In case of a tag name, make sure to also specify it in lower case. See How do I use syntax highlighting? section below for more info.

Not all languages supported by highlight.js are supported on Stack Exchange. See Language codes currently available on Stack Exchange below for the list of supported languages. If your language is not on the list, whether or not it is otherwise supported by highlight.js, follow the instructions in How do I report a bug or request a new language? section below.

3. Check that the question is using exactly one tag with a highlighting language specified

By default, Stack Exchange uses the tags on a question to determine the language you are using. If there's more than one tag that has a highlighting language specified, it lets highlight.js infer what's the best language to use. If none of the tags have one, no syntax highlighting will be performed. The question's tags are also used to determine the default syntax highlighting language for its answers.

This is a complete list of every identifier that you can use in a language hint for syntax highlighting. All the language identifiers in each group point to the same highlighter. Other language aliases set by highlight.js (in parentheses) should work, but only identifiers before them are officially supported by Stack Exchange.

Note that, as mentioned before, this is a subset of all languages supported by highlight.js.

Any language identifiers used in a post that go unrecognized, are for languages that are not deployed on Stack Exchange, or are for tags that do not have a language hint specified in their data will be ignored and will trigger an automatic language detection.

Note to editors:

Please do not edit the above list manually.

  • Just because you type something in and it looks like it's highlighted correctly does not mean the identifier actually exists in the system. Keep in mind that invalid identifiers trigger an automatic language detection.
  • Not all the languages supported by highlight.js are available everywhere. The set of languages available depends on how the library is built or included. This means that several languages that are indicated as supported in the above linked list are not supported by Stack Exchange's version of highlight.js, as they are in separate modules which have not been deployed on Stack Exchange.

Because of these points, to update the list please use the script it was generated with and link to this script (or another Meta post which confirms an identifier's existence) in your edit summary.

Note to commenters:

The comments on this FAQ are for requesting clarification of something you might not understand in the FAQ so that it can be fixed. Please DO NOT ask if certain languages will be supported in the future. Follow the instructions in How do I report a bug or request a new language? section to request language support.

Add "renders as" for three examples
Source Link
Makyen
  • 24.5k
  • 8
  • 43
  • 79
Loading
deleted 13 characters in body
Source Link
Loading
Updated the language list from https://meta.stackexchange.com/a/372141/578924 and simplified the 2a troubleshooting section, fixed inaccuracies, updated the notes, misc. improvements
Source Link
EvgenKo423
  • 1.6k
  • 1
  • 11
  • 19
Loading
Added missing alias vhdl, vhd
Source Link
bad_coder
  • 27.3k
  • 7
  • 50
  • 129
Loading
Updated the troubleshooting section, improved spelling and formatting
Source Link
EvgenKo423
  • 1.6k
  • 1
  • 11
  • 19
Loading
Fewer words
Source Link
Loading
Remove technologically inaccurate statements derived from the referenced answer; grammar, etc.
Source Link
Makyen
  • 24.5k
  • 8
  • 43
  • 79
Loading
added 690 characters in body
Source Link
Loading
Put the directions for requesting new languages under the heading which says the section is going to explain that. Add a link to the current general response to all such feature requests.
Source Link
Makyen
  • 24.5k
  • 8
  • 43
  • 79
Loading
added 271 characters in body
Source Link
Loading
that information is no longer in this question ...
Source Link
Glorfindel Mod
  • 252.6k
  • 61
  • 626
  • 1.3k
Loading
Expanded ("psh" is way too cryptic).
Source Link
Loading
added 190 characters in body; deleted 10 characters in body
Source Link
Loading
Remove remaining references to Prettify including unused links, delete commented out text in request new lang. section
Source Link
zcoop98
  • 10k
  • 3
  • 26
  • 58
Loading
Bring lang list back up to date, courtesy of https://meta.stackexchange.com/questions/355638/syntax-highlighting-faq-list-updates
Source Link
zcoop98
  • 10k
  • 3
  • 26
  • 58
Loading
added 146 characters in body
Source Link
Loading
update to reflect highlightjs changes
Source Link
Loading
With the switch, two separate lists no longer makes sense; add TypeScript
Source Link
animuson StaffMod
  • 189.3k
  • 38
  • 578
  • 849
Loading
deleted 34 characters in body
Source Link
Martijn Pieters
  • 101.8k
  • 33
  • 296
  • 402
Loading
replaced some refferences to prettify with highlight.js
Source Link
Luuklag
  • 36.1k
  • 7
  • 73
  • 176
Loading
At least point to highlight.js. Many details still need fixing however
Source Link
Martijn Pieters
  • 101.8k
  • 33
  • 296
  • 402
Loading
added 271 characters in body; deleted 14 characters in body
Source Link
Loading
1
2 3 4 5