The Federal Flag Code prescribes the proper display of and respect for the United States Flag. Each state has its own flag law. Here is the code in its entirety (PUBLIC LAW 94 - 344):
To amend the joint resolution entitled "Joint resolution to codify and emphasize existing rules and customs pertaining to the display and use of the flag of the United States of America".
Resolved by the Senate and House of Representatives of the United States of America in Congress assembled, That the joint resolution entitled "Joint resolution to codify and emphasize existing rules and customs pertaining to the display and use of the flag of the United States of America", as amended (36 U.S.C. 171-178), is amended --
SEC. I That the following codification of existing rules and customs pertaining to the display and use of the flag of the United States of America be, and is hereby, established for the use of such civilians or civilian groups or organizations as may not be required to conform with regulations promulgated by one or more executive departments of the Government of the United States. The flag of the United States for the purpose of this chapter shall be defined according to title 4, United States Code, Chapter I, section I and section 2 and Executive Order 10834 issued pursuant thereto.
(a) It is the universal custom to display the flag only from sunrise to sunset on buildings and on stationary flagstaffs in the open. However, when a patriotic effect is desired, the flag may be displayed twenty-four hours a day if properly illuminated during the hours of darkness.
(b) The flag should be hoisted briskly and lowered ceremoniously.
(c) The flag should not be displayed on days when the weather is inclement, except when an all weather flag is displayed.
(d) The flag should be displayed on all days, especially on New Year's Day, January 1; Inauguration Day, January 20; Lincoln's Birthday, February- 12; Washington's Birthday, third Monday in February; Easter Sunday (variable); Mother's Day, second Sunday in May; Armed Forces Day, third Saturday in May; Memorial Day (half-staff until noon), the last Monday in May; Flag Day, June 14; Independence Day, July 4; Labor Day, first Monday in September; Constitution Day, September 17; Columbus Day, second Monday in October; Navy Day, October 27; Veterans Day, November 11; Thanksgiving Day, fourth Thursday in November; Christmas Day, December 25; and such other days as may be proclaimed by the President of the United States; The birthdays of States (date of admission); and on State holidays.
(e) The flag should be displayed daily on or near the main administration building of every public institution.
(f) The flag should be displayed in or near every polling place on election days.
(g) The flag should be displayed during school days in or near every schoolhouse.
SEC. 3 That the flag, when carried in a procession with another flag or flags, should be either on the marching right; that is, the flag's own right, or, if there is a line of other flags, in front of the center of that line.
(a) The flag should not be displayed on a float in a parade except from a staff, or as provided in subsection (j).
(b) 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 motor car, the staff should be fixed firmly to the chassis or clamped to the right fender.
(c) 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. (See Public Law 107, page 4)
(d) The flag of the United States of America, when it is displayed with another flag against a wall from crossed staffs, should be on the right, the flag's own right, and its staff should be in front of the staff of the other flag.
(e) The flag of the United States of America should be at the center and at the highest point of the group when a number of flags of States or localities or pennants of societies are grouped and displayed from staffs.
(f) When flags of states, cities, or localities, or pennants of societies are flown on the same halyard with the flag of the United States, the latter should always be at the peak. When the flags are flown from adjacent staffs, the flag of the United States should be hoisted first and lowered last. No such flag or pennant may be placed above the flag of the United States or to the United States Flag's right.
(g) When flags of two or more nations are displayed, they 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.
(h) When the flag of the United States is displayed from a staff projecting horizontally or at an angle from the window sill, balcony, or front of a building, the union of the flag should be placed at the peak of the staff unless the flag is at half staff. When the flag is suspended over a sidewalk from a rope extending from a house to a pole at the edge of the sidewalk, the flag should be hoisted out, union first, from the building.
(i) When displayed either horizontally or vertically against a wall, the union should be uppermost and to the flag's own right, that is, to the observer's left. When displayed in a window, the flag should be displayed in the same way, with the union or blue field to the left of the observer in the street.
(j) When the flag is displayed over the middle of the street, it should be suspended vertically with the union to the north in an east and west street or to the east in a north and south street.
(k) When used on a speaker's platform, the flag, if displayed flat, should be displayed above and behind the speaker. When displayed from a staff in a church or public auditorium, the flag of the United States of America should hold the position of superior prominence, in advance of the audience, and in the position of honor at the clergyman's or speaker's right as he faces the audience. Any other flag so displayed should be placed on the left of the clergyman or speaker or to the right of the audience.
(l) The flag should form a distinctive feature of the ceremony of unveiling a statue or monument, but it should never be used as the covering for the statue or monument.
(m) 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. On Memorial Day the flag should be displayed at half-staff until noon only, then raised to the top of the staff. By order of the President, the flag shall be flown at half-staff upon the death of principal figures of the United States Government and the Governor of a State, territory, or possession, as a mark of respect to their memory. In the event of the death of other officials or foreign dignitaries, the flag is to be displayed at half-staff according to Presidential instructions or orders, or in accordance with recognized customs or practices not inconsistent with law. In the event of the death of a present or former official of the government of any State, territory, or possession of the United States, the Governor of that State, territory, or possession may proclaim that the National flag shall be flown at half-staff. The flag shall be flown at half-staff thirty days from the death of the President or a former President; ten days from the day of death of the Vice President, the Chief Justice or a retired Chief Justice of the United States, or the Speaker of the House of Representatives; from the day of death until interment of an Associate Justice of the Supreme Court, a Secretary of an executive or military department, a former Vice President, or the Governor of a State, territory, or possession; and on the day of death and the following day for a Member of Congress. As used in this subsection -
(1) the term 'half-staff' means the position of the flag when it is one-half the distance between the top and bottom of the staff;
(2) the term 'executive or military department' means any agency listed under sections 101 and 102 of title 5, United States Code; and
(3) the term Member of Congress' means a Senator, a Representative, a Delegate, or the Resident Commissioner from Puerto Rico.
(n) When the flag is used to cover a casket, it should be so placed that the union is at the\B0 head and over the left shoulder. The flag should not be lowered into the grave or allowed to touch the ground.
(o) When the flag is suspended across a corridor or lobby in a building with only one main entrance, it should be suspended vertically with the union of the flag to the observer's left upon entering. If the building has more than one main entrance, the flag should be suspended vertically near the center of the corridor or lobby with the union to the north, when entrances are to the east and west or to the east when entrances are to the north and south. If there are entrances in more than two directions, the union should be to the east.
SEC. 4 That no disrespect should be shown to the flag the United States of America; the flag should not be dipped to any person or thing. Regimental colors, State flags, and organization or institutional flags are to be dipped as a mark of honor.
(a) The flag should never be displayed with the union down, except as a signal of dire distress in instances of extreme danger to life or property.
(b) The flag should never touch anything beneath it, such as the ground, the floor, water,
(c) The flag should never be carried flat or horizontally, but always aloft and free.
(d) The flag should never be used as wearing apparel, bedding, or drapery. It should never be festooned, drawn back, nor up, in folds, but always allowed to fall free. Bunting of blue, white, and red, always arranged with the blue above, the white in the middle, and the red below, should be used for covering a speaker's desk, draping the front of the platform, and for decoration in general.
(e) The flag should never be fastened, displayed, used, or stored in such a manner as to permit it to be easily torn, soiled, or damaged in any way.
(f) The flag should never be used as a covering for a ceiling.
(g) 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.
(h) The flag should never be used as a receptacle for receiving, holding, carrying or delivering anything.
(i) The flag should never be used for advertising purposes in any manner whatsoever. It should not be embroidered on such articles as cushions or handkerchiefs and the like, printed or otherwise impressed on paper napkins or boxes or anything that is designed for temporary use and discard. Advertising signs should not be fastened to a staff or halyard from which the flag is flown.
(j) No part of the flag should ever be used as a costume or athletic uniform. However, a flag patch may be affixed to the uniform of military personnel, firemen, policemen, and members of patriotic organizations. The flag represents a living country and is itself considered a living thing. Therefore, the lapel flag pin being a replica, should be worn on the left lapel near the heart.
(k) 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.
SEC. 5 During the ceremony of hoisting or lowering the flag or when the flag is passing in a parade or in review, all persons present except those in uniform should face the flag and stand at attention with the right hand over the heart. Those present in uniform should render the military salute. When not in uniform, men should remove their headdress with their right hand and hold it at the left shoulder, the hand being over the heart. Aliens should stand at attention. The salute to the flag in a moving column should be rendered at the moment the flag passes.
SEC. 6 During rendition of the national anthem when the flag is displayed, all present except those in uniform should stand at attention facing the flag with the right hand over the heart. Men not in uniform should remove their headdress with their right hand and hold it at the left shoulder, the hand being over the heart. Persons in uniform should render the military salute at the first note of the anthem and retain this position until the last note. When the flag is not displayed, those present should face toward the music and act in the same manner they would if the flag were displayed there.
SEC. 7 The Pledge of Allegiance to the Flag, "I pledge allegiance to the Flag of the United States of America, and to the Republic for which it stands, one Nation under God, indivisible, with liberty and justice for all", should be rendered by standing at attention facing the flag with the right hand over the heart. When not in uniform men should remove their headdress with their right hand and hold it at the left shoulder, the hand being over the heart. Persons in uniform should remain silent, face the flag and render the military salute.
SEC. 8 Any rule or custom pertaining to the display of the flag of the United States of America, set forth herein, may be altered, modified, or repealed, or additional rules with respect thereto may be prescribed, by the Commander-in-Chief of the Armed Forces of the United States, whenever he deems it to be appropriate or desirable; and any such alteration or additional rule shall be set forth in proclamation.