A person dressed up as the "Mad Hatter" from Alice in Wonderland. | DANIEL DEME

Even those who haven’t read Alice in Wonderland have heard of the Mad Hatter and his tea party. But author Lewis Carroll didn’t coin the simile ‘as mad as a hatter’: it existed long before ‘Alice’ and was based on fact, not fiction.

The reason for the association of hat-makers and madness is that they frequently suffered from dementia, brought on by the mercury content of felt: the mercury compound used in the making of felt is a poison that can lead to illness and forms of madness.

Lewis Carroll, a maths teacher whose real name was Charles Lutwidge Dodgson, was aware that hat-makers could suffer from certain degrees of madness, which was why he created a character called the Mad Hatter.

Mercury poisoning was so rife among hat-makers that its use in the production of felt was banned in the 1940s.

The trilby hat was named after Trilby, the main character in George du Maurier’s 1894 novel of the same name. But there’s a little more to it than that. In West Yorkshire slang, trilbies were pig’s trotters and at one time Australians used the word for the human foot.

In his 1934 novel The Yellow Joss, Ion M. Idriess wrote: “Stony broke, tucker-bags busted, no smokes, corn on me trilbies, an’ a thirst that’d swallow a brewery. What a life!”

The choice of Trilby as the main character’s name in the du Maurier novel, wasn’t fortuitous. He called her Trilby because she was an artist’s model — and famous for the beauty of her feet.

In the stage version of the novel, in the late 19th century, Trilby wore a soft felt hat with a narrow brim and an indented crown that became known as the trilby.

The stetson hat, on the other hand, got its name from a real person. The New Jersey hat-maker John Batterson Stetson opened a factory in Philadelphia in the late 1860s where he made the type of hat we now call the stetson.

The hat, made famous by hundreds of anonymous screen cowboys as well as John Wayne and Larry Hagman in his J.R. Ewing role, was nicknamed the 10-gallon hat. But the name didn’t refer to the liquid measure.

It came from the braided hat worn by many of the Spanish speakers in western states such a Texas, New Mexico, California and Colorado. The Spanish word for braid is ‘galón’ and J.B. Stetson’s hats were big enough to carry 10 braids.

But the cowboy hat is not always credited to the Americans: some experts say it originated at Christys, the London ht company. Among their early creations was a hat that looked very much like a typical cowboy hat. It was used throughout the British Empire.

The bowler hat got its nickname from its London maker, Thomas Bowler. He sold the first one in December 1849 to William Coke for 10 shillings.

Made of hard felt with a rounded crown and a narrow brim, the bowler quickly became associated with those working in the City or in managerial positions, as well as off-duty Army officers.

For a time, the term ‘to be given one’s bowler’ meant being demobilised. In the late 1950s, when the War Office wanted to reduce its officer force drastically, the ‘golden bowler’ meant early retirement on most favourable terms. It was the equivalent of the ‘golden handshake’ in civilian life.

The panama hat didn’t get its name from its maker or any other person: American journalists named it after the country where they first saw it. And it was the wrong country. The journalists were in Panama, but the hat’s country of origin was Ecuador.

This trilby-style hat was already known in the late 19th century, but it wasn’t until 1906 that it got pushed on to the international stage.

That was the year when President Roosevelt wore one on a visit to Panama to see how work on the Panama Canal was progressing.

The hat was totally unknown to journalists covering the presidential visit, but they had to write about it, if only for captions on pictures of the President wearing one.

There was no time to find out anything about the hat, and as they were in Panama, journalists with a deadline to meet christened it the Panama hat.

Pictures of President Roosevelt wearing this distinctive headgear went round the world and the panama name stuck forever more.

No one at the time realised the hats had existed since the 16th century. The Incas first produced them from the leaves of the toquilla, a palm-like tree native to South America. Weavers in Ecuador started to make them in 1630.

Four years after President Roosevelt’s was photographed wearing the hat, King Edward VII went to Goodwood races wearing a light summer suit…and panama hat.

This sudden break from the traditional top hat and tails worn by the aristocracy caused a sartorial scandal. But the royal seal of approval was decisive — the panama hat was accepted everywhere.

Anthony Hopkins created new interest in the hat when he wore one in Hannibal, the 2001 movie that was a sequel to Silence of the Lambs.

And he looked very good in it because a panama hat invariably gives the wearer a touch of class and elegance.

An authentic version, meaning one made in Ecuador, costs from £60 to £100, although at top London hatter Lock & Co, people such as Sir Mick Jagger, Brad Pitt, Jude Law or Keira Knightly, pay up to £600.

The difference in price depends on the quality of the vegetable fibre material and the finish. If you come across one costing less than €50 it could have been made in Porreres, Palmanova or Puigpunyent, so it’s definitely not the real thing.