Trick-or-treating, also known as guising, is an activity for children on Halloween in which they proceed from house to house in costumes, asking for treats such as candy with the question, "Trick or treat?", or the phrase "Happy Halloween!" Trick-or-treating is one of the main traditions of Halloween. It has become socially expected that if one lives in a neighborhood with children one should purchase treats in preparation for trick-or-treaters. The National Confectioners Association reported in 2005 that 80 percent of adults in America planned to give out candy to trick-or-treaters, and that 93 percent of children planned to go trick-or-treating.
The activity is popular in the United States, the United Kingdom, Ireland and Canada, and due to culture importation in recent years has started to occur among children in Australia and New Zealand, in many parts of Europe, and in the Saudi Aramco camps of Dhahran and Ras Tanura in Saudi Arabia. The most significant growth — and resistance — is in the United Kingdom, where the police have threatened to prosecute parents who allow their children to carry out the "trick" element.
In Sweden children dress up as witches and go trick-or-treating on Maundy Thursday (the Thursday before Easter) while Danish children dress up in various attires and go trick-or-treating on Fastelavn (or the next day, Shrove Monday).
The practice of dressing up in costumes and begging door to door for treats on holidays goes back to the Middle Ages, and includes Christmas wassailing. Trick-or-treating resembles the late medieval practice of "souling," when poor folk would go door to door, receiving food in return for prayers for the dead on All Souls Day (All Hallows Day). It originated in the British Isles, and is still popular in Ireland, and in some parts of England and Scotland. Shakespeare mentions the practice in his comedy The Two Gentlemen of Verona (1593), when Speed accuses his master of "puling [whimpering, whining], like a beggar at Hallowmas."
Yet there is no evidence that souling was ever practiced in America, and trick-or-treating may have developed in America independent of any Irish or British antecedent. There is little primary documentation of masking or costuming on Halloween — in Ireland, the UK, or America — before 1900. The earliest reference to ritual begging on Halloween in English-speaking America occurs in 1915, with another isolated reference in Chicago in 1920. The thousands of Halloween postcards produced between the turn of the 20th century and the 1920s commonly show children but do not depict trick-or-treating. Ruth Edna Kelley, in her 1919 history of the holiday, The Book of Hallowe'en, makes no mention of such a custom in the chapter "Hallowe'en in America." It does not seem to have become a widespread practice until the 1930s, with the earliest known uses in print of the term "trick or treat" appearing in 1934, and the first use in a national publication occurring in 1939. Thus, although a quarter million Scots-Irish immigrated to America between 1717 and 1770, the Irish Potato Famine brought almost a million immigrants in 1845–1849, and British and Irish immigration to America peaked in the 1880s, ritualized begging on Halloween was virtually unknown in America until generations later.
Trick-or-treating spread from the western United States eastward, stalled by sugar rationing that began in April 1942 during World War II and did not end until June 1947.
Early national attention to trick-or-treating was given in October 1947 issues of the children's magazines Jack and Jill and Children's Activities, and by Halloween episodes of the network radio programs The Baby Snooks Show in 1946 and The Jack Benny Show and The Adventures of Ozzie and Harriet in 1948. The custom had become firmly established in popular culture by 1952, when Walt Disney portrayed it in the cartoon Trick or Treat, Ozzie and Harriet were besieged by trick-or-treaters on an episode of their television show, and UNICEF first conducted a national campaign for children to raise funds for the charity while trick-or-treating.