America’s most common form of paying respect to a national emblem or symbol, the flag salute with the Pledge of Allegiance, started as part of a nationwide public school observance in 1892 honoring the four-hundredth anniversary of Columbus’s discovery of America. Immediately it became popular and was widely used in schools in every state. By 1935, 24 states had statutes requiring instruction in flag respect; nine specifically required that the flag salute ceremony be conducted regularly in all public schools. None explicitly demanded pupils participate in the ceremony as it was, at the time, almost inconceivable that anyone might refuse.
This eventually changed. Read more in the First Amendment Encyclopedia entry on the Pledge of Allegiance.