Q: Historically in the United States, which types of entertainment have decided to have the national anthem played, which have not, when, and why?

—Ralph Coates, Decatur

A: Written by Francis Scott Key in 1814 and afterward set to its familiar tune, it wasn't until 1916, when President Woodrow Wilson formally designated it, and then 1931, when President Herbert Hoover signed it into law, that "The Star-Spangled Banner" officially became the national anthem.

Before that, however, the song had already been played by bands at sporting events, with early instances including the opening of Union Grounds baseball park in Brooklyn, N.Y., in 1862 and baseball’s opening day in Philadelphia in 1897, Major League Baseball historian John Thorn wrote in his Our Game blog on mlb.com.

During the 1918 World Series, what had been an occasional practice of bands playing “The Star-Spangled Banner” took on heightened meaning as both the Chicago Cubs and Boston Red Sox rallied the crowds with the patriotic song at a time when Americans were facing the realities of World War I, according to ESPN. During World War II, baseball teams began playing the national anthem at every game.

While there have been exceptions, since then, the national anthem “has been played before virtually every professional — and many collegiate and high school — baseball, football, basketball, hockey and soccer contests in this country,” said historian and author Marc Leepson in a recent PolitiFact report.

Fast Copy News Service wrote this column. Do you have a question? We’ll try to get the answer. Call 404-222-2002 or email q&a@ajc.com (include name, phone and city).