The soft drink version of root beer is generally made using extracts or flavored syrups diluted into carbonated water. It is not as widely popular as other soft drinks, such as cola, and constitutes only 3% of the U.S. soft drink market.
Root beer extract may contain a variety of flavors, coming from the wide range of ingredients. Bark from the roots of the sassafras tree was the typical flavor in root beer historically, and is the primary flavor most individuals associate with the beverage. It is slightly red at times. Sassafras bark was banned by the FDA in 1960 because of the carcinogenic properties of its constituent chemical safrole. A safrole-free variety is now used, with some claiming that it has a weaker flavor than the pre-1960 variety. Acacia is also used.
There are hundreds of root beer brands in the United States, produced in every U.S. state, and there is no standardized recipe. The primary ingredient, artificial sassafras flavoring, is complemented with other flavors, common ones being vanilla, wintergreen, cherry tree bark, liquorice root, sarsaparilla root, nutmeg, anise, molasses, cinnamon and clove.
Homemade root beer is usually made from concentrate, though it can also be made from actual herbs and roots. Both alcoholic and non-alcoholic root beers have a thick and foamy head when poured, often enhanced through the addition of yucca extract.
Root beer was a traditional beverage and herbal medicine. Throughout history, the beverage was often mildly alcoholic mixed with ginger. As a medicine it was used for treating cough and mouth sores.
Commercial root beer was developed by Charles Elmer Hires, in 1866. Hires presented root tea powder at the 1876 Philadelphia Centennial exhibition, and in 1893 he began selling bottled, carbonated root beer. His choice of a name seemed unfortunate at the time, as the word "beer" drew the wrath of the temperance movement. However, Hires had his product tested by a laboratory and trumpeted their conclusion that root beer contained less alcohol than bread. Hires' root beer became the "Temperance drink"—among other slogans.
There was an upsurge in the popularity of root beer in the United States during the period of Prohibition as local breweries resorted to brewing non-alcoholic beverages. Root beer was at its most popular in the period during and after prohibition, and has since declined in popularity as the soft drink market has been taken over by brands such as Coca Cola, Pepsi and Dr Pepper. Today, root beer is often mixed with ice cream as a root beer float.