Although adopted June 14, 1777, when the Continental Congress resolved that "the Flag of the united states be 13 stripes alternate red and white, that the Union be 13 stars white in a blue field representing a new constellation," the origin of the national flag is somewhat obscure. Legend has it that George Washington asked Betsy Ross to produce the first Stars and Stripes, although this is not documented. She is known to have supplied flags to the Continental Navy.
Prior to the Stars and Stripes was the Continental Colors, which was 13 horizontal red and white stripes for the 13 colonies and the British Union Jack as a depiction of the rebels' desire for the historic rights of British citizens. The how and why of the change from the Union Jack to stars is not known. Prior to that change, stars were uncommon on flags; since that time, they have become popular.
After Kentucky and Vermont joined the Union, two stars and two stripes were added in 1795. Such a flag inspired Francis Scott Key to write The Star Spangled Banner. Design of the flag again was changed in 1818, with the decision to keep the 13 stripes permanently and add stars to indicate the current number of states in the Union.
To date, the U.S. flag has been through 27 versions, the most recent introduced July 4, 1960, when Hawaii was admitted to statehood. Until 1912, no official pattern existed for the arrangement of the stars. Flags of the 19th century varied greatly in their star patterns, in the number of points on the stars, in the shades of red and blue, in the length-to-width ratio of the flag, and in other details. It was not until the 20th century that such factors were standardized.