What is proper etiquette upon hearing the national anthem of the United States?
When the anthem plays, a U.S. citizen should rise from his seat, stand at attention, face the flag and place his right hand over his heart. This etiquette also applies to children who are old enough to stand on their own. The Emily Post Institute notes that if a citizen is walking to her seat when the anthem begins to play, she should stop walking, stand at attention and place her hand over her heart until the anthem concludes. People should not mill around while the anthem plays.
Hat Protocol: A male should remove his hat (discounting religious headwear such as a yarmulke) with his right hand and hold it over his left shoulder. Thus, the hand holding the hat is placed over the heart.
Eating and Drinking: According to the Emily Post Institute, a citizen should not eat, drink, smoke or chew gum during the national anthem. If possible, she should set down her food containers so that there are no items in her hands.
Military Personell: Individuals in military uniform must face the flag, and upon the first note of the anthem, perform the military salute. This position should be held throughout the entire anthem.
Exceptions: Although U.S. Code ยง 301 provides a guide for national anthem etiquette, it is not considered a law under which a person may be prosecuted if he chooses not to follow the protocol. The First Amendment of the U.S. Constitution protects the rights of those who do not follow this protocol for personal reasons. For example, it is against religious practice for Jehovah's Witnesses to stand during the playing of any country's national anthem.
Sources: aw.cornell.edu/uscode/text/36/301
http://www.americanflags.org/docs/etiquette.jsp?pageId=0690200091781119362392163