A national anthem is generally a patriotic musical composition that evokes and eulogizes the history, traditions, and struggles of its people, recognized either by a nation's government as the official national song, or by convention through use by the people. The majority of national anthems are marches or hymns in style. The countries of Latin America, Central Asia, and Europe tend towards more ornate and operatic pieces, while those in the Middle East, Oceania, Africa, and the Caribbean use a more simplistic fanfare. Some countries that are devolved into multiple constituent states have their own official musical compositions for them (such as with the United Kingdom, Russian Federation, and the former Soviet Union). Their constituencies' songs are sometimes referred to as national anthems even though they are not sovereign states.
National anthems are used in a wide array of contexts. Certain etiquette may be involved in the playing of a country's anthem. These usually involve military honours, standing up/rising, removing headwear etc. In diplomatic situations the rules may be very formal. There may also be royal anthems, presidential anthems, state anthems etc. for special occasions.
They are played on national holidays and festivals, and have also come to be closely connected with sporting events. Wales was the first country to adopt this, during a rugby game against New Zealand in 1905. Since then during sporting competitions, such as the Olympic Games, the national anthem of the gold medal winner is played at each medal ceremony. It is also played before games in many sports leagues, since being adopted in baseball during World War II. When teams from two different nations play each other, the anthems of both nations are played, the host nation's anthem being played last.