This is further more elaborated on in The Nursery "Alice", a shortened Variation of Alice's Adventures in Wonderland, adapted through the author himself for younger kids. In this article it truly is mentioned which the character is donning a hat on his head using a value tag containing the numbers https://socialrator.com/story7007619/a-secret-weapon-for-mad-hatter-spice