'If—' is a poem by Rudyard Kipling. It was written in 1895; the poem was first published in the 'Brother Square Toes' chapter of Rewards and Fairies, Kipling's 1910 collection of short stories and poems. It is a memorable evocation of Victorian stoicism and the 'stiff upper lip' that popular culture has made into a traditional British virtue. Its status is both confirmed by the number of translations and parodies it has inspired, and by the widespread popularity it still draws amongst Britons (it was voted Britain's favourite poem in a 1995 BBC opinion poll).
According to Kipling in his biography Something of Myself (1937), the poem was inspired by Dr Leander Starr Jameson, who in 1895 led a raid by British forces against the Boers in South Africa, subsequently called the Jameson Raid. This defeat increased the tensions that ultimately led to the Second Boer War. The British press, however, portrayed Jameson as a hero in the middle of the disaster, and the actual defeat as a British victory.
Source: Wikipedia