Marines know that the Tripolitan War started in May of 1801 when the Bashaw of Tripoli made the mistake of declaring war on the United States. Thomas Jefferson sent a squadron of ships with 180 Marines aboard, and, as everyone knows from the song, the Marines kicked the Barbary pirates around the block. By the end of the Tripolitan War, Marine Lieutenant Presley N. O'Bannon war was carrying the famous "Mamluke Sword", a gift, which the rightful ruler of Tripoli had presented to O'Bannon, to honor his heroism in the battle for Derna. Marine officers until today have carried swords patterned on the Mamluke Sword. Marine flags after the war bore the motto "To the Shores of Tripoli."
The "Halls of the Montezumas", as every Marine knows, entered Marine history almost fifty years later. The Marines performed many heroic deeds during the Mexican War in the late 1840's, especially in the capture and occupation of Mexico City and of the Castle of Chapultapec (otherwise known, as you probably could guess, as the "Halls of Montezuma".) In recognition of their valor, the citizens of Washington, D.C. presented Marine Commandant Archibald Henderson with a blue and gold standard, which bore the motto, "From Tripoli to the Halls of the Montezumas."
Among the many things Marines know is the fact that, according to tradition, a Marine on duty in Mexico wrote the words of the Marine Hymn. For the sake of euphony, the unknown author transposed the phrases in the motto on the Colors so that the first two lines of the Hymn would read: "From the Halls of Montezuma, to the Shores of Tripoli." The music for the Hymn came from Jacques Offenbach's comic opera Genevieve de Brabant.
The official Marine Corps Hymn web page is at http://hqinet001.hqmc.usmc.mil/HD/Historical/Customes_Traditions/Marines_Hymn.htm
Then move on to the main part of the official USMC Internet site that most of the others use as their main source of information: http://www.usmc.mil/. There you can check out the two impressive gateways to Marine Corps history: http://www.usmc.mil/historical.nsf/brief+history?openview&count=9999 and http://www.usmc.mil/historical.nsf/frequently+asked+questions?openview&count=9999. There are links on the latter for more info on the Marine Hymn (including the lyrics of all four official verses) and for other Marine lore.
The Commandant's Message for the
225th (year 2000) birthday is at http://www.usmc.mil/cmc/32cmc.nsf/main.