Wikipedia:Syntax highlighting

Syntax highlighting is a feature to display source code in different colors and fonts to indicate the structure to readers.

Wikipedia:Syntax highlighting or WP:SYNTAX may refer to:

Wikitext syntax highlighting for editors

Toggling wikitext editor syntax highlighter in the 2010 editor (top) and 2017 editor (bottom).
  • mw:Help:Extension:CodeMirror
    • Can be turned on or off using the pencil icon in the editor (see image)
    • A more advanced version including code folding and autocompletion can be enabled at Special:Preferences#mw-prefsection-betafeatures -> Improved Syntax Highlighting
  • Extension:CodeEditor – syntax highlighting for JavaScript, CSS, and modules available on a button () at the left of the toolbar for these page types.
  • User:Remember the dot/Syntax highlighter – documentation for the wikitext syntax highlighter available as "Syntax highlighter" under Preferences → Gadgets → Tick (S) Syntax highlighter: Alternative to the default coloring of wiki syntax in the edit box (works best in Firefox and works almost all of the time in Chrome and Opera).
  • User:Cacycle/wikEd – an editor which includes syntax highlighting, available as "wikEd" under Preferences → Gadgets → Tick (U) wikEd: alternative full-featured integrated text editor for Firefox, Safari, and Google Chrome (documentation).
  • Help:Text editor support – how to use an external text editor (most of which perform syntax highlighting) to edit Wikipedia pages.

Rendered syntax highlighting on pages for readers

In general

  • Help:Wikitext – basic info on the MediaWiki markup syntax used in Wikipedia's pages ("wiki-markup")
  • Wikipedia:Manual of Style – Wikipedia's internal style manual for all English Wikipedia articles, including detail on layouts and formatting.