diff --git a/documentation/standards.md b/documentation/standards.md
index 152a90923401..2614220ef0e1 100644
--- a/documentation/standards.md
+++ b/documentation/standards.md
@@ -134,6 +134,28 @@ Note that only "absolute" paths (starting with a '/') are allowed. The root
 directory of that path is documentation/, that is, :doc:`/bsp-manual/index`
 points at documentation/bsp-manual/index.rst.
 
+### Code blocks
+
+A code block is highlighted as BitBake unless it says otherwise, because
+most of the code in the manuals is BitBake metadata. A block of anything
+else states its language:
+
+    .. code-block:: console
+
+       $ bitbake core-image-minimal
+
+Use the language the block actually is, not the one it resembles. A
+session with a prompt is `console`, a script without one is `shell`, and
+a listing of paths or program output is `text`.
+
+If the BitBake lexer cannot read a valid BitBake block, show it as `text`
+and say why in a comment above it, so it can be switched back once the
+lexer is fixed:
+
+    .. Shown as text: the Pygments BitBake lexer misreads this block.
+
+    .. code-block:: text
+
 ## Adding screenshots
 
 The preferred format for adding screenshots is
