The "Flag Code", as it is widely known, was not part of the laws of the United States until legislation - passed on June 22, 1942, and modified December 22 of that year - was enacted.  Prior to that date, guidelines for honoring, as well as procedures for displaying, the American flag were set forth by the National Flag Conference.

On June 14, 1923, 66 groups, including the American Legion and the Daughters of the American Revolution, met in Washington, D.C. to establish a set of procedures for displaying and honoring the flag.  With minor modifications in 1924, these guidelines remained the sole written doctrine regarding the American flag until the codification in 1942.

Originally enacted as Title 36, Chapter 10, United States Code by the second session of the 77th Congress, the Flag Code remained pretty much intact until the August 12, 1998 when the 105th Congress passed House Resolution 1085, Section 2(b) repealed the Flag Code as Title 36 and re-enacted it as Section 4 - 10 of Title 4, Chapter 1.