QR Codes and Bar Codes
A QR code—where does its decoded value go?
✅ NormativeSettled. The requirement holds as written.📄 Page ruleCan be applied from the page alone.Read §7.3.7 in the RFC ↗
A QR code or bar code MUST be rendered as an image reference whose alt text holds the decoded
content and whose target holds the literal label: ,
. The code MUST also be an element of its own, carrying the decoded
value and a box around the code.
Reading the examples. Each one pairs a source page with the output the rule expects. ✅ Sample: the rule applies. ❌ Counter-sample: it looks like it applies and does not, or a rendering got it wrong. A non-conforming output, in red, is shown only for contrast. … marks content left out of an excerpt.
The rendering


So a code that decodes to a tracking URL becomes .
The alt-text and target slots are used in the reverse of the usual Markdown convention: the content goes in the alt slot, the literal label in the target slot. That is deliberate.
Why this form
It is the only encoding where the Markdown alone is useful. A reader gets the decoded payload — usually a URL or a tracking number — without following an element reference. The code's own element still carries the scan value, and its box locates the code for anyone who needs the image.
When the code does not decode
A payload MUST NOT be invented. A code that does not decode MUST be rendered with the label alone and an empty alt text, and is still its own element with its box:

Example
a QR code closing a product page
A QR code printed at the foot of a product page, beside the line "Pour découvrir d'autres exemples, c'est ici :" — the prose leads directly into it, so dropping the code leaves a sentence pointing at nothing. The code on this page does not decode, so the alt text stays empty; had it decoded, its payload would fill the alt slot. The code is its own element, with a box around the code alone.
Source page

Expected output · excerpt, foot of the block
…
Pour découvrir d'autres exemples, c'est ici :

<!-- … -->
Pour découvrir d'autres exemples, c'est ici :
Neighbouring rules, and how they differ
More
Rule id text-qr-codes-and-bar-codes · text images marks