Though the flag code contains many rules, its guiding principle is simple: "No disrespect should be shown to the flag of the United States of America."
Here's a look at some of the rules meant to show respect for the flag:
How to carry the flag
The flag "should never be carried flat or horizontally, but always aloft and free."
It should also "never touch anything beneath it, such as the ground, the floor, water, or merchandise."
How to hoist it
"The flag should be hoisted briskly and lowered ceremoniously," the code says. "The flag, when flown at half-staff, should be first hoisted to the peak for an instant and then lowered to the half-staff position. The flag should be again raised to the peak before it is lowered for the day."
Where to display it
The flag "should be displayed daily on or near the main administration building of every public institution," "in or near every polling place on election days," and "in or near every schoolhouse" during school days.
When to display it
The code says it's "the universal custom" to display the flag from sunrise to sunset, but it can still be displayed at night "if properly illuminated during the hours of darkness."
If you want to display the flag in inclement weather, make sure it's an "all-weather" flag made of material that can withstand the elements.
Displaying the flag during parades
The flag "should not be displayed on a float in a parade except from a staff, or as provided in subsection (i) of this section."
That subsection states: "When displayed in a window, the flag should be displayed … with the union or blue field to the left of the observer in the street."
Also relevant to parades: "The flag should not be draped over the hood, top, sides, or back of a vehicle or of a railroad train or a boat. When the flag is displayed on a motorcar, the staff should be fixed firmly to the chassis or clamped to the right fender."
Displaying it during other ceremonies
At a statue unveiling: "The flag should form a distinctive feature of the ceremony of unveiling a statute or monument, but it should never be used as the covering for the statute or monument."
And if someone's speaking at a public event, the flag should be displayed "above and behind the speaker."
Displaying it among other flags
The code's clear that the American flag generally shouldn't be made to look inferior to other flags: "No other flag or pennant should be placed above or, if on the same level, to the right of the flag of the United States of America, except during church services conducted by naval chaplains at sea, when the church pennant may be flown above the flag during church services for the personnel of the Navy."
The code goes on to specify that the American flag should be displayed more prominently than the nearby flags of states and cities, and the "pennants of societies."
When displaying the American flag beside the flag of another nation, the two flags "are to be flown from separate staffs of the same height. The flags should be of approximately equal size. International usage forbids the display of the flag of one nation above that of another nation in time of peace."
Using the flag for advertising purposes
The code discourages this: "The flag should never be used for advertising purposes in any manner whatsoever."
The flag and ads shouldn't even share the same pole: "Advertising signs should not be fastened to a staff or halyard from which the flag is flown."
In case you want to decorate your flag
The flag "should never have placed upon it, nor on any part of it, nor attached to it any mark, insignia, letter, word, figure, design, picture, or drawing of any nature."
In case you want to decorate yourself with your flag
The flag also shouldn't be used "as a costume or athletic uniform."
Disposing of a damaged flag
"The flag, when it is in such condition that it is no longer a fitting emblem for display, should be destroyed in a dignified way, preferably by burning."