The literary genre of fantasy, along with science fiction and horror, can itself be put under the larger genre umbrella of speculative fiction. Thus, the definitions in this writeup should be considered roughly descriptive rather than prescriptive. There's a lot of genre crossover in some of my favorite speculative fiction (for instance, Brown Girl in the Ring, which has been alternately classified as SF, fantasy, or horror, depending on the eye of the beholding reviewer), and the best writers don't confine their work to little genre boxes.
However, in general, fantasy stories take place in a reality in which magic and/or supernatural or mythical beings exist. Elves, dragons, and unicorns are of course what many people think of when one mentions fantasy. However, the possibilites go much farther than this; look at any of the works of Neil Gaiman. Tim Powers' modern-day novels of ghosts and Las Vegas Tarot games are also fantasy, as is (in my opinion) Hopkinson's aforementioned tale of a young voodoo priestess in a futuristic Toronto.
But the genre distinction is about more than the trappings of myth or the fantastic. Part of it is about how the speculative fiction elements are handled.
Arthur C. Clarke once wrote, "Any science or technology which is sufficiently advanced is indistinguishable from magic." And some stories, most notably in space operas and science fantasies, do treat high technology as a type of "it's-just-there-and-it-works" magic; the focus of the tale is on the characters and their adventures, and science is never discussed. Conversely, some fantasies treat magic as an exacting technology; Michael Swanwick's science fiction often incorporates mythical elements, as does the work of some cyberpunk-era writers. So, the appearance of a god or a fairy in a story does not automatically make it fantasy; nor does staging an epic quest aboard space ships make for "true" science fiction.
Having said all that,
fantasy literature has many sub-genres that characterize certain types of stories. The following are the classifications most widely recognized in the
publishing industry.
Contemporary Fantasy -- Magic or supernatural/mythical entities exist in the modern world. Much of Tim Powers' work (Last Call, for instance) is in this category, as is Eric S. Nylund's Dry Water.
- Urban Fantasy -- This is contemporary fantasy that takes place in (and is not removable from) a city environment. Think of Neil Gaiman's Neverwhere, or China Mieville's Perdido Street Station. Much of Charles DeLint's work also falls in this category.
- Dark Fantasy -- Some argue that "dark fantasy" is merely "code" for horror fiction. I disagree; there is a lot of contemporary fantasy that has a distinctly dark or creepy feel without crossing over into out-and-out horror. I would further categorize much of Tim Powers' work as dark fantasy, since he makes liberal use of ghosts, vampires, and some fairly skin-crawling imagery in his work. Likewise, I consider much of Neil Gaiman's work, for instance his children's book Coraline, to be dark fantasy.
- Slipstream/Magic Realism -- These are contemporary stories, often written in a highly literary or nonlinear style, that include some element of the fantastic. Such a story might read like it belongs in The New Yorker, but it's about a man whose wife is, under the crush of domestic duties, literally turning into a zombie. Kelly Link's Stranger Things Happen is a fabulous collection of slipstream stories.
Science Fantasy -- These are tales that blend science fiction and fantasy, or which treat technology as magic, but which "read" mainly like fantasy due to their focus on character and adventure. (Tales of this sort that "read" like science fiction are often space operas.) Almost everything Roger Zelazny (Lord of Light) has written is some flavor of science fantasy. Such fantasies can be tales in which:
- none of the characters understands the fantastic technologies they use (for instance, the genetically-engineered, telepathic dragons in Anne McCaffrey's Pern books, or much of the "science fiction" Ray Bradbury has written)
- characters possess powerful psychic abilities that are analagous to magical powers (Marion Zimmer Bradley's Darkover series)
- science fictional technology and magic both work (Nalo Hopkinson's Brown Girl in the Ring and Fred Saberhagen's excellent, epic Empire of the East.).