The Pledge of Allegiance was written in August 1892 by Francis Bellamy (1855–1931), who was a Baptist minister and Christian socialist.
The original “Pledge of Allegiance” was published in the September 8 issue of the popular children’s magazine The Youth’s Companion as part of the National Public-School Celebration of Columbus Day, a celebration of the 400th anniversary of Christopher Columbus’s arrival in the Americas. The event was conceived and promoted by James B. Upham, a marketer for the magazine, as a campaign to instill the idea of American nationalism in students and sell flags to public schools. According to author Margarette S. Miller, this was in line with Upham’s vision which he “would often say to his wife: ‘Mary, if I can instill into the minds of our American youth a love for their country and the principles on which it was founded, and create in them an ambition to carry on with the ideals which the early founders wrote into The Constitution, I shall not have lived in vain.'”
The official name of The Pledge of Allegiance was adopted in 1945. The last change in language came on Flag Day 1954 when the words “under God” were added.
According to the United States Flag Code, the current Pledge of Allegiance reads:
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.
According to the Flag Code, the Pledge “should be rendered by standing at attention facing the flag with the right hand over the heart. When not in uniform, men should remove any non-religious 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.”