In lots of Minecraft minigames I have seen buttons, for example to start the game, that have a floating name tag above them. How do they do that ?
an alternative to the bukkit plugin mentioned by Mathperson.
Hide a named mob (or wither skullas mentioned by Quentin) in the wall, normally something not very noisy. if you hide it one block back the name will appear through the wall, just make sure that the mob can't move very much.
I would suggest a bat as it can be held in a 1x1 space so you would still have room for the redstone for the button, just place it 1 block back and 1 block up from the button block.
This is the only completely Vanilla way of doing it that i know of.
What i prefer to do is actually have the animal showing, either by using glass or glass panes this also allows you to see the name a lot clearer
This can be done with a Bukkit plugin such as Holographic Displays. You will have to have a server to use Bukkit plugins though.