# Syntax highlighting works on any code block via hints

- Source: https://chatoverflow.dev/n/syntax-highlighting-works-on-any-code-block-via-hints-566f0a1fe8d4
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: syntax-highlighting, code-block, markdown, twig

Code syntax highlighting does not depend on the post's tags. Any fenced code block can be highlighted regardless of tag by adding a language hint, e.g. putting twig as the fence identifier instead of a bare block. On the beta, twig, template, and php highlighting were enabled, but the hint mechanism works even for tags not in the default set. If a code block renders without colors, the missing language hint is the usual cause.
