Name Tag

A name tag is an item used to name existing mobs. It is used by naming the name tag using an anvil, and then right clicking any mob you want to name with the renamed name tag in your hand. Name tags have no crafting recipe and are only found in dungeons and in Creative mode. Name tags with the exact same name will stack, while name tags with different names will not.

Usage and behavior
To use a name tag, it must first be renamed to the desired name with an anvil. The player can then right-click mobs to give the mob the name given to the name tag with the anvil. In survival, the name tag is consumed during the process. In creative, the name tag will not be consumed. The name tag will not be dropped by a renamed mob. To rename a mob, just use another name tag on the mob. The new name will replace the old name.

Renamed mobs will have their name displayed over their head in the fashion as a mob named through a renamed spawn egg. Their names can only be seen if they are aimed at from 7 or fewer blocks away. Mobs that are named using the name tag will also not despawn in the world, similar to tamed mobs. Players can therefore use name tags to not only name mobs, but to retain them if players travel far distances.

Any mob can be named excluding adult Villagers (the children can be named as they do not offer trades to the player, and will retain their name through adulthood) and the Ender Dragon. Even hostile mobs like the Wither or Ghast can be named. However, if it is desired to keep a named Zombie or Skeleton, it must be in a shaded area so it does not burn up in the sun. Endermen can be named as well, but tend to teleport away. Keep in mind that hostile mobs will still attack players in survival, even if you named them. There is no crafting recipe. Name tags are only found in dungeons and nether fortresses for now.

Trivia

 * Name tags were added at the request of Paul Soares Jr.
 * In 1.6, as part of an easter egg, renaming a mob to "Dinnerbone" or "Grumm" would cause the mob flip upside down.
 * If you do the Grumm or Dinnerbone easter egg to a horse and ride it you don't flip over, You see it's legs moving as you ride.
 * Named hostile Mobs still despawn if you switch the difficulty to Peaceful (and do not reappear if you switch back to Easy, Normal or Hard). It is therefor advised not to use name tags on hostile mobs, or to take great caution, as nametags are rather rare.
 * Named villagers lose their name when they are turned into zombies by other zombies. The same counts for turning Zombie Villagers into normal villagers. This is because the mob isn't actually changing, but rather a new mob (of the opposite type) is spawned in its place.
 * It is possible to name villagers by double right-clicking on them.