The several branches of the United States Armed Forces are represented by flags, among other emblems and insignia. Within each branch, various flags fly on various occasions, and on various ships, bases, camps, and military academies.
In general, the order of precedence when displaying military flags together is the U.S. National Colors, U.S. Army, U.S. Marine Corps, U.S. Navy, U.S. Air Force, and U.S. Coast Guard. However, in any period, such as in wartime, where the U.S. Coast Guard is operating as part of the U.S. Navy, the U.S. Coast Guard flag would precede the U.S. Air Force flag.
Many maritime flags have been used in the United States.
All naval vessels belonging to the United States fly the Ensign of the United States, which is identical to the flag of the United States (though originally was a design similar to the Grand Union Flag). All documented U.S. vessels, and all U.S. vessels in international or foreign waters, are required to display this ensign between 08:00 and sunset. Conversely, vessels of the U.S. Coast Guard display a unique ensign as a demonstration of its authority to stop, board, search, and conduct arrests and seizures aboard vessels subject to United States jurisdiction. Historically, the ensign displayed has changed as the flag of the United States has changed. Similarly, vessels of the Continental Navy flew many varied ensigns due to a vague standard set by the Continental Congress, the arrangement of stars and pattern of stripes being left to the commander's interpretations.
Vessels of the U.S. Navy, Coast Guard, Military Sealift Command, and National Oceanic and Atmospheric Administration display the Jack of the United States from the jackstaff. Originally the First Navy Jack was displayed, a design containing the thirteen red and white stripes; while some maintain that it was superimposed by an uncoiled rattlesnake and the motto "Dont tread on me" [sic], reminiscent of the Gadsden flag. It was later changed to a blue canton with white stars, the "union", and updated as each state entered the Union. However, all warships were directed to fly the First Navy Jack, including the disputed rattlesnake and motto, for the duration of the War on Terror in 2002.