Is there any single word for a joke which is initially told by somebody as a real thing, then when person is fooled, the person disclosing the information that it's just a joke? Like April Fools' joke.
Such a joke is often told with deadpan
Deliberately impassive or expressionless
Oxford Dictionaries Online
Example: "His deadpan tone made it difficult to tell whether my dog had actually been crushed by a piano."
This is typically only done in situations where one would expect the speaker to sound serious.
While not a noun for the joke itself, the term straight face is often used to describe the demeanor of the teller
A blank or serious facial expression, especially when trying not to laugh: my father kept a straight face when he joked
Oxford Dictionaries Online
Note that this expression is also used to describe someone who is deliberately lying.
This may fall under a practical joke which ranges from tricking people into believing something frankly preposterous to painting someone's banister in honey. It may also be referred to as a hoax or ruse as stated by Prof yattle.
Edit: upon further consideration, this is a case of somebody kidding you. Often somebody will say, after fooling you: "just kidding".
You have two concepts there - (a) a joke, and (b) something to fool people. I can't think of something for the first (i.e. something funny), but for the second you could consider:
Ruse - An action intended to deceive someone; a trick
... or synonyms such as hoax, artifice, deceit, and similar. None specifically means "... and then you get told the real answer!", however.
A shaggy dog story
extremely long-winded anecdote characterized by extensive narration of typically irrelevant incidents and terminated by an anticlimax or a pointless punchline
Shaggy dog stories play upon the audience's preconceptions of joke-telling. The audience listens to the story with certain expectations, which are either simply not met or met in some entirely unexpected manner. A lengthy shaggy dog story derives its humour from the fact that the joke-teller held the attention of the listeners for a long time (such jokes can take five minutes or more to tell) for no reason at all, as the end resolution is essentially meaningless
Consider "conceit" - defn 2.1 here: http://www.oxforddictionaries.com/definition/english/conceit
In comedy, a conceit can refer to a situation in which the comedian pretends that a story or situation is true, even if it can be easily demonstrated to be false, in order to exploit it for comic effect. The audience "plays along" with the comedian, buying into the conceit in order to enjoy the comedy more. April Fools stories could be seen as an example of this: some people are fooled by them, but most people will see through it quickly but still enjoy seeing it presented as if it were a serious news story.
A leg-pull - from the phrase "pull one's leg".
(Similarly - at least in Australia - "yank one's chain". In other cultures this seems to mean to harrass.)
Such a story could be yarn.
And to tell such a story would be to spin a yarn.
an exciting or interesting story; especially : a story that is so surprising or unusual that it is difficult to believe
to say or do something jokingly or mockingly
'Pulled one' is a common idiom for this sort of thing:
Bob really pulled one on Sally, he had her convinced the zombie apocalypse had begun.
If you really need a single word or "pulled one" is too vague, gag works well too:
Bob is a real joker, he has this gag where he pretends to not know what common words mean; really gets people worked up.
noun: anecdote; plural noun: anecdotes
- an account regarded as unreliable or hearsay.
"his wife's death has long been the subject of rumour and anecdote"
Being an old curmudgeon with no sense of humor, I tend to use an old-fashioned word for this: it’s a lie:
a false statement made with deliberate intent to deceive; an intentional untruth; a falsehood
something intended or serving to convey a false impression; imposture
But I’ve heard the youngsters referring to such a stunt as a prank:
a trick of an amusing, playful, or sometimes malicious nature
I remember this word as a noun, but I’ve heard the kids using it as a verb. ;-)