In Henry VI, Part III (1592) William Shakespeare had Queen Margaret saying:
Off with his head, and set it on York gate;
So York may overlook the town of York.
In Lewis Carroll's Alice In Wonderland (1865) the Queen of Hearts shrieks this phrase several times in the story: Off with his head.
Children in England were familiar with this phrase. Lewis Carroll was the sobriquet of Prof. Lutwidge Dodgson who told fascinating stories to Alice Liddell, daughter of the Dean of Christ Church, Oxford, England.
British children also knew that hatters used mercury while working with felt. The vapors often made them a bit loopy over time. Hence the "Mad" Hatter.