The United States Flag Code establishes advisory rules for display and care of the flag of the United States of America. It is Section 1 of Title 4 of the United States Code (4 U.S.C. 1 et seq). This is a U.S. federal law, but there is no penalty for failure to comply with them and they are not widely enforced - indeed, punitive enforcement would conflict with the First Amendment right to freedom of speech, as the U.S. Supreme Court has ruled when the subject has come up in the past. (A Flag Desecration Amendment has been proposed from time to time and, if ever passed into law, would override Supreme Court rulings on this matter.)
This etiquette is as applied within U.S. jurisdiction. In other countries and places, local etiquette applies.
Below are the basic standards of respect & display of the United States Flag as per the Flag Code.
The flag should never be dipped to any person or thing, unless it is the ensign responding to a salute from a ship of a foreign nation.
The flag should never be displayed with the union (the starred blue canton) down, except as a signal of dire distress in instances of extreme danger to life or property.
The flag should not be used as "wearing apparel, bedding, or drapery", or for covering a speaker's desk, draping a platform, or for any decoration in general (exception for coffins). Bunting of blue, white and red stripes is available for these purposes. The blue stripe of the bunting should be on the top.
The flag should never be drawn back or bunched up in any way.
The flag should never be used as a covering for a ceiling. The flag should never be used for any advertising purpose.
It should not be embroidered, printed, or otherwise impressed on such articles as cushions, handkerchiefs, napkins, boxes, or anything intended to be discarded after temporary use. Advertising signs should not be attached to the staff or halyard.
The flag should not be used as part of a costume or athletic uniform, except that a flag patch may be used on the uniform of military personnel, firefighters, police officers, and members of patriotic organizations. (Note that on Army uniforms, where the flag is put on the sleeve of the uniform, the flag patch is displayed with the stars facing forward, in the direction the wearer is facing. This is done to give the impression of the flag flowing in the wind while being carried forward across the battlefield. This is known as the "Reverse Field Flag."
The flag should never have placed on it, or attached to it, any mark, insignia, letter, word, number, figure, or drawing of any kind.
The flag should never be used as a receptacle for receiving, holding, carrying, or delivering anything.
The flag should never be stepped on.
The flag should not be draped over the hood, top, sides or back of a vehicle, railroad train or boat.
When the flag is lowered, no part of it should touch the ground or any other object; it should be received by waiting hands and arms.
To store the flag it should be folded neatly and ceremoniously.
The flag should be cleaned and mended when necessary.
When a flag is so tattered that it can no longer serve as a symbol of the United States, it should be destroyed in a dignified manner, preferably by burning.
The flag should never touch anything beneath it. Contrary to an urban legend, the flag code does not state that a flag that touches the ground should be burned. Instead, the flag should be moved so it is not touching the ground.
The flag should always be permitted to fall freely.