Skip to main content
1 of 3
Zanna Mod
  • 71.6k
  • 3
  • 67
  • 161

What you are seeing there is syntax highlighting. This can be formatted explicitly in a post, for example, you can turn on Bash syntax highlighting for a code snippet by adding a tag before it:

<!-- language: lang-bash -->

Syntax highlighting is also applied automatically according to a posts tags. In this case, the question has the tag , so all code in the question and all of its answers will be displayed with Python 3 syntax highlighting.

This is often not what you want... for example the question relates to Python but is mainly about package management and contains a code-formatted block of APT output. You can turn off syntax highlighting with a tag like this:

<!-- language: lang-none -->

or to turn off all syntax highlighting in a post

<!-- language-all: lang-none -->
Zanna Mod
  • 71.6k
  • 3
  • 67
  • 161