For most American kids, it wouldn’t be Halloween without trick-or-treating for candy; however, that wasn’t always the case. When the custom of trick-or-treating started in the 1930s and early 1940s, children were given everything from homemade cookies and pieces of cake to fruit, nuts, coins and toys. In the 1950s, candy manufacturers began to get in on the act and promote their products for Halloween, and as trick-or-treating became more popular, candy was increasingly regarded as an affordable, convenient offering. It wasn’t until the 1970s, though, that wrapped, factory-made candy was viewed as the only acceptable thing to hand out to all the little ghosts and goblins that showed up on people’s doorsteps. A key reason for this was safety, as parents feared that real-life boogeymen might tamper with goodies that weren’t store-bought and sealed.

Today, when it comes to Halloween candy, a number of the most popular brands are enduring classics. For example, the first Hershey’s Milk Chocolate bar was produced in 1900 and Hershey’s Kisses made their debut in 1907. Company founder Milton Hershey was a pioneer in the mass-production of milk chocolate and turned what previously had been a luxury item for the well-to-do into something affordable for average Americans. In the early 1900s, he also built an entire town, Hershey, Pennsylvania, around his chocolate factory. In 1917, Harry Burnett Reese moved to Hershey, where he was employed as a dairyman for the chocolate company and later worked at its factory. Inspired by Milton Hershey’s success, Reese, who eventually had 16 children, began making candies in his basement. In the mid-1920s, he built a factory of his own and produced an assortment of candies, including peanut butter cups, which he invented in 1928 and made with Hershey’s chocolate. During World War II, a shortage of ingredients led Reese to pull the plug on his other candies and focus on his most popular product, peanut butter cups. In 1963, Hershey acquired the H.B Reese Candy Company.

In 1923, a struggling, Minnesota-born candy maker, Frank Mars, launched the Milky Way bar, which became a best-seller. In 1930, he introduced the Snickers bar, reportedly named for his favorite horse, followed in 1932 by the 3 Musketeers bar. Frank’s son Forrest eventually joined the company, only to leave after a falling out with his father. Forrest Mars relocated to England, where he created the Mars bar in the early 1930s. In 1941, he launched M&Ms. Mars anticipated that World War II would produce a cocoa shortage, so he partnered with Bruce Murrie, son of a Hershey executive, in order to have access to a sufficient supply of ingredients; the candy’s name stands for Mars and Murrie.

Another crowd-pleasing Halloween candy, the Kit Kat bar, was first sold in England in 1935 as a Rowntree’s Chocolate Crisp and in 1937 was rechristened the Kit Kat Chocolate Crisp. The name is said to be derived from a London literary and political group, the Kit-Cat (or Kit Kat) club, established in the late 17th century. The group’s moniker is thought to be an abbreviation of the name of the man who owned the shop where the group originally gathered. Since 1988, the brand has been owned by Nestle, maker of another perennial trick-or-treat favorite, the Nestle Crunch bar, which debuted in the late 1930s.

And of course, no Halloween would be complete without candy corn, which was invented in the 1880s by George Renninger of the Wunderle Candy Company of Philadelphia. Other companies went on to produce their own versions of the tricolor treat, none longer than the Goelitz Confectionery Company (now the Jelly Belly Candy Co.), which has been doing so since 1898.