Ribaldry, or blue comedy, is humorous entertainment that ranges from bordering on indelicacy to gross indecency. It is also referred to as "bawdiness", "gaminess" or "bawdry".
Sex is presented in ribald material more for the purpose of poking fun at the foibles and weaknesses that manifest themselves in human sexuality, rather than to present sexual stimulation either excitingly or artistically. Also, ribaldry may use sex as a metaphor to illustrate some non-sexual concern, in which case ribaldry may verge on the territory of satire.
Like any humour, ribaldry may be read as conventional or subversive. Ribaldry typically depends on a shared background of sexual conventions and values, and its comedy generally depends on seeing those conventions broken.
The ritual taboo-breaking that is a usual counterpart of ribaldry underlies its controversial nature and explains why ribaldry is sometimes a subject of censorship. Ribaldry, whose usual aim is not "merely" to be sexually stimulating, often does address larger concerns than mere sexual appetite. However, being presented in the form of comedy, these larger concerns may be overlooked by censors.