Which docs do I need

The syntax grew a lot between major versions. Match your mod version first, Mod Menu shows it next to the name.

CustomHudMinecraftDocs
v41.20.4 and newer, including our 1.21.11 to 26.2 buildsCurrent docs
v31.19.2 to 1.20.6v3 guide
v21.19.0 to 1.19.2v2 guide
v11.16.5 to 1.18.2v1 guide

Downloads for old versions are on Modrinth.

What each one can do

Featurev1v2v3v4
Four corner sectionsyesyesyesyes
Center sections3.1yes
Inline conditionalsyesyesyesyes
=if:= blocksyesyes
Item icons and armor slotsyesyes
Named colors3.1yes
Math, lists, bars, togglesyes
Hex color form0xAARRGGBBAARRGGBBRRGGBB and moreRRGGBB and more
Profiles3 slotsunlimited

These old pages follow the original CustomHud documentation. We have only run the current syntax ourselves, on 26.1 and 26.2.