D&D is basically the buffet table of gaming. It's primarily a "fantasy" game, but it can be stretched to include just about any kind of fantasy, even science fantasy.
Like take the Derro- directly lifted from the Deros of "The Shaver Mystery"! D&D has had sixguns, ray guns, six armed white apes from Barsoom (the Girallon, and don't tell me that Thri-Kreen aren't inspired by Tharks), at least one of the many aquatic foes are inspired by Deep Ones, and of course Mind Flayers are a deliberate imitation of Dread Cthulhu! Entire classes are devoted to imitating Sword & Sorcery, High Fantasy, Low Fantasy, and Arthurian Fantasy heroes! Monks for Hong Kong Kung Fu Fantasy (or maybe just Kung Fusploitation- and eventually an entire 1e supplement for Ninjas and more)- the list is endless.
Legendary artifacts include a friggin' battlemech (The Mighty Servant of Leuk-o) and the product of weird science (The Machine of Lum the Mad), along with Baba Yaga's Hut! Vorpal Swords hail from the absurdist fantasy of Lewis Carrol (and I wouldn't be surprised if the Sword of Sharpness came about due to that one fight between Arthur, King of the Britains and a certain Invincible Black Knight)!
Several monsters were inspired by some cheap plastic toys from Japan (and tell me the Hook Horror doesn't bear a striking resemblance to Gigan, I dare you). You can encounter creatures from every real world myth and legend, from Leprechauns to Kobolds, to Rakshasa. The game has airships, space ships (magical or technological, Clarke's Third Law notwithstanding), and in the Planeswalker's Guide of 2e, there was a Wizard Kit for a guy who floats around on a balloon! Planescape has people communicating in Victorian gutterspeak, and you can even play a clockwork Rogue Modron, a part-fiend, part-celestial, or part-genie!
Druids rub elbows with Psionicists. Flying carpets and magical Pipes that let you command rats. Thor's Hammer, gauntlets, and belt of strength! Fire and Frost Giants! Simply put, nobody's fiction or belief system is safe from D&D. The Spelljammer Monstrous Compendium presents Gamera and the Guyver as enemies your PC's can face! We got Kaiju and Frankenstein's Monster (Flesh Golem or Adam, take your pick), the original (Clay) Golem of Jewish legend, and a magic ring that turns you invisible!
You can't fit D&D in any one genre or sub-genre, because D&D is
everything. That's it's strength, and it's charm. People who play D&D are nerds, and nerds love pop culture. We'll quote Monty Python, The Princess Bride, Spaceballs, and Star Wars at the gaming table. If the DM sends a giant boulder rolling at your character, someone is at least going to hum a John Williams score!
And despite the fact that some will hurt me for mentioning it, there's a certain parody adventure where you can encounter poorly disguised versions of Doctor Who, Marvel Super Heroes, and the crew of the Starship Enterprise. Heck, in issue 4 of Dungeon, there's a wacky adventure that has this bizarre encounter (art courtesy of Jim Holloway):
Simply put, like Darkseid, D&D
is.