Before an epitaph was carved, it was spoken. The Greek word first meant a speech given over the dead, and only later the few lines left on the stone.
Epitaphios joins epi-, "at" or "over," with taphos, "tomb" or "funeral." In Athens the phrase epitaphios logos named the formal funeral oration for citizens killed in war. Historians think the custom, and a shared burial ground for the war dead, began around 470 BC.
The most famous example is the one Pericles gave in 431 BC, in the first year of the Peloponnesian War. Thucydides recorded it, and it is the earliest such speech preserved in full. Later orators, including Lysias and Demosthenes, wrote their own. Plato even parodied the genre in his Menexenus.
Latin took the word over. In Latin, epitaphium still meant a funeral oration. Through Medieval Latin it passed into Anglo-French and then into Middle English, where Merriam-Webster finds it in the 14th century, now meaning an inscription on a tomb. The speech had shrunk to fit the stone.
Ancient epitaphs had their own styles. Greek ones were often emotional, written first in elegiac verse. Roman ones were blunter and more uniform, listing facts about the dead. A common Roman wish was "May the earth lie light upon thee." In many European languages the word can also mean the monument itself, often a church plaque.
Modern epitaphs tend toward the short and the memorable. The comedian Spike Milligan wanted "I told you I was ill" on his headstone. He was buried at St Thomas' churchyard in Winchelsea, East Sussex, and the diocese refused the line. His family had it carved in Irish instead, Dúirt mé leat go raibh mé breoite, and the diocese let it stay.
Others went for a final punchline too. Mel Blanc's stone reads "That's all folks," a last word that would have puzzled Pericles.