"a jest, something done to excite laughter," from L. jocus
"joke, sport, pastime," from PIE base *yek-
"to speak" (cf. Bret. iez
"language," O.H.G. jehan
"to say," Ger. Beichte
"confession"). Originally a colloquial or slang word. Meaning "something not to be taken seriously" is 1791. Joker,
meaning "odd face card in the deck" is from 1885, probably from earlier slang sense of "man, fellow, chap" (1811).
"American manufacturers of playing-cards are wont to include a blank card at the top of the pack; and it is, alas! true that some thrifty person suggested that the card should not be wasted. This was the origin of the joker." ["St. James's Gazette," 1894]Practical joke
"trick played on someone for the sake of a laugh at his expense" is from 1804.