Among humankind, there are those which delight in a bawdy joke, and those which prefer a joke exhibiting more wit. People laugh at irony, at others' misfortunes, and at complete nonsense. Only by getting to know a human will one learn which sorts that of humor that individual appreciates more. Among the common other humanoid races, though, as with all aspects of culture, there's a little less variation. This isn't to say all elves share one agreed-upon sense of humor, but there are safe generalizations to assume. Below are this author's takes on the subject:
The ordered societies of the dwarven people operate on assumed standards. People live up to these expectations in order to better serve their clan and state. The status quo is what makes the world go round. So what would be more laughable, to a dwarf, than to see the status quo turned on its head? Cowardly or incompetent soldiers, inexperienced or foolish adults on the receiving end of a child's wise-cracking, and cross-dressers and other gender-inappropriate behavior, are all likely to be the butt-ends of jokes made over tankard of dwarven ale. Dwarves enjoy being able to mock in a safe environment what would radically upset their way of life if it turned up in reality, including men doing traditionally-considered "women's work" and vice-versa (though this concept is different among dwarves than among humans), as well as soldiers running from a single goblin or not knowing which end to grip their weapons by. Such world-flipping icons also consist of polite orcs, honorable goblins, generous giants, and timid trolls. Their standards of formal marriages also provide joke-fodder; portrayals of salacious characters as well as drastic class differences in a partnership are comical, as are notions of interracial relationships. The stereotypical promiscuous gnome is akin to a cultural icon (see Entertainment- Dwarves and Romance/Sexuality- Gnomes), much like the fool in Shakespeare’s day or “Sambo” in the 19th-century U.S..
However, dwarves aren't the most jocular people. And while some might crack a joke or five with a colleague or comrade on occasion, they're rarely receptive to others trying to play upon their sense of humor-- coming from someone foreign to their culture, how can they be sure that such an idea is meant in jest, and not a threat to their stable society? Another humanoid attempting to get a dwarf to crack a smile (and good luck) would be better served trying a different sense of humor. Only the most blithe (and rather tipsy) dwarves will invite you to sit with them and enjoy a drink if you walk up to them with a remark about a fictional gnome hitting on the king's daughter.
Elves' longevity gives them a very broad view of things, and they tend to focus on more simple aspects of life. Because of this, it tickles the typical elven funny bone to see things blown out of proportion. Hyperbole is a humor that most elves will appreciate. Think the Family Guy fight between Peter and the Giant Chicken-- after one gives the other an expired coupon, they engage in a five-minute long battle to the death. That's the sort of humor which falls under hyperbole. In a similar vein, it's common among elves to poke fun at a seemingly bad situation by sarcastically grossly exaggerating the consequences, such as by using the 'slippery slope' fallacy. Elves sometimes find laughable literary characters with one-track minds, even if the obsession is with something noble. Ultimately, the average elf will find funny anything which involves dramatic hyperbole. Many elves are also fond of satire, but satire tends to make them think more than it makes them smile.
Elves don't laugh loudly, smiling more often than chuckling, and chuckling much more often than letting out a full-bellied yuck. (In fact, laughing too much at a small joke is another exaggeration the usual elf would find humorous.) They also don't place great cultural value in jokes, seeing them as rather small in scope compared to a great work of literature or a moving piece of music. If you joke around with an elf, they'll probably appreciate the gesture of goodwill, but not nearly so much the humor. (With humor, as with other facets of life, elves are "generally pleasant and gracious" even to those who don't quite understand how to handle the matter "properly.")
Gnomes are the one race in the Player's Handbook whose entry mentions their love of humor. As such, it's hardly necessary to expand on their love of puns and practical jokes. It is good to keep in mind, though, that practical jokes are, to gnomes, a way of keeping eachother humble and a chance to demonstrate cleverness, not a means of triumphing over others. As puns go, whether or not a gnome prefers a witty pun requiring clever exploitation of a language, or thinks a bawdy joke is just as good despite the many euphemisms which make such puns easy, is simply dependent on the individual gnome. Satire is also delightful to gnomes, who are appreciative of it in almost the opposite ways most elves are; it's a kind of humor, not a rhetorical device. As one might infer from their fondness of nicknames, gnomes also enjoy nonsense-humor. Stringing together words in ways that don't make sense is a good way to try to make a gnome smile. Other bizarre notions (such as Lewis Carroll's description the Wonderland game of croquet, in which one's ball is a hedgehog and one's mallet a flamingo,) also fall under this category of humor.
The importance of wit in gnomish culture makes humor of central importance. Gnomes love to laugh, and are more likely to appreciate a joke, even from a member outside of their race, than any other common race (except for some humans). If you really want to endear yourself to a gnome though, try introducing yourself with a clever pun demonstrating knowledge of both Gnome and another common language, plus a healthy dislike of kobolds.
Half-elves are just as varied as humans in their particular senses of humor, though some may possess the tendencies of elves, especially if raised among them. What makes them bear mentioning though is their appreciation of dramatic irony and situations of misunderstandings (such as in Merchant of Venice or Angel Densetsu). Many half-elves enjoy seeing someone else experience the befuddlement of different people seeing the same thing different ways. A few individuals, particularly the more cynical or dour ones, instead grow bitter when exposed to such humor, feeling like the matter is personal mockery.
Individual halflings exhibit different senses of humor; they are, for the most part, about as varied as humans in their tastes. Common favorites include various forms of irony (e.g., almost any scene in a Wile E. Coyote/Roadrunner cartoon) and any jokes involving a clever mastery of language. Dirty jokes are often found distasteful, but this can vary from halfling to halfling and from time to time. One noted preference which seems common to most halflings, though, are inappropriately egocentric behaviors. Lecherous characters are rarely well-received, but other ridiculously self-interested characters are staples of halfling humor. This includes gluttons (such as Garfield the Cat, Homer Simpson, or Monkey D. Luffy), sloths (also Homer Simpson, and Garfield, or the comic Dilbert’s Wally), and the pretentious (Hercule from DragonBall Z, or Linebeck from The Legend of Zelda: Phantom Hourglass). Assuming the behaviors don't end up hurting someone, the community-oriented halflings frequently see such characters' self-centeredness as really too ridiculous, and extremely comical.
In a group, halflings usually don't need jokes to appreciate one another. At mirthful times they laugh easily and readily with eachother, with jokes being but one medium through which they can enjoy eachother's company. Halflings are a bit too formal to begin joking around among other races, but as good as they are at fitting in, they can usually adapt when in a jocose setting in which humor is expected. Many halflings are rather protean in their senses of humor, enabling them to quickly establish themselves as "one of the folks" in a new situation.
The Savage Humanoids--
As one would expect, goblinoids, orcs, kobolds, and drow are all pretty fond of schadenfreude. Most jokes involve someone else experiencing misfortune. Drow delight in stories of misfortune simply befalling others (often divinely), while orcs and hobgoblins tend to focus more on the dishing-out of said misfortunes. Goblins and kobolds enjoy both, with goblins loving tales of hapless people getting ambushed and kobolds enjoying stories of hapless people falling into traps. Lecherous jokes are also very common among some of these races: among goblins these jokes tend toward hyperbole, while to orcs this line of humor is notably misogynistic. Drow enjoy ridiculing the male body, and jokes about impotent males are as delightful to them as jokes about women's rights are to certain real-life men. (Drow, however, can rarely be said to laugh, and humor to them means something much different than to the common races.) Among all of these races, humor is often a kind of social competition, used not only in earning appreciation but in belittling others as well. A person can win over a group of some of the less-intelligent savage humanoids using humor-- assuming they get past the race's initial hostile outlook to begin with (if targets are Indifferent one can use Perfom (comedy) in place of Diplomacy or Intimidate, at the DM’s discretion).