Chris Colfer, who plays Kurt Hummel in the high school musical “Glee,” has written a novel that bears an unmistakable televisual stamp. In confecting this fairy-tale homage, which he began working on when he was in grade school, Colfer has written dialogue according to sitcom laws of quippery and built his narrative with an actorly sense of character motivation. Still, a kind of stern traditionalism undergirds the story. When it comes to imagining the continuing lives of our storybook legends, the author seems to side with the sixth-grade teacher of his main characters — twins lost, literally, in a good book — who denounces the Disneyfication of the classics: “Fairy-tale ‘adaptations’ are usually stripped of every moral and lesson the stories were originally intended to teach, and replaced with singing and dancing forest animals.”

Colfer’s Snow White has no time for bluebirds. In the prologue, she sets a pop-Gothic tone by paying a visit to her dungeon-bound stepmother, who hints at a sympathetic back story. “What the world fails to realize,” the evil queen says, “is that a villain is just a victim whose story hasn’t been told.” When she finally explains the roots of her evil, it’s after she’s escaped her cell, just before a climactic castle-storming battle, and the payoff is as handsome as a prince. Shrewdly, Colfer leaves her behind-the-scenes tear-jerker hanging from a cliff for nearly 400 pages while our two heroes dangle from Rapunzel’s tower, fling themselves from tall trees into enchanted kingdoms and reach other heights of metamythical action during their visit to the Land of Stories.

Once upon a time, in contemporary Anytown, lived Alex Bailey and her brother, Conner. The two are passably lively variations on familiar types: she’s an energetic egghead sitting at the head of the class; he’s a jokester snoozing in the back row. Their adventure begins a year after their father’s death, and Colfer brings a light touch to describing their grief even while laying it on thick with thematic resonance. (Mr. Bailey died driving home from his bookstore.) Their paternal grandmother, twinkling into view on their 12th birthday, bequeaths to them a family heirloom, an old storybook anthology whose cover turns out to be a dimensional gateway in the tradition of C. S. Lewis’s passage to Narnia.

Stumbling through this bookwormhole, the kids plummet into a world where Cinderella, Sleeping Beauty and Snow White have each married a son of King Charming; where Goldilocks is a glamorous fugitive mounted on a cream-colored steed named Porridge; and where Red Riding Hood, in a room pulled together by a wolfskin rug, overdresses to impress Jack, of beanstalk fame. Colfer, perhaps grown tired of treating his characters with gentle reverence, imagines the red-caped lass as a camped-up tart, vain — and pining in vain for the giant-killer: “She was showing too much skin, wearing too much makeup, and was dressed too well for the middle of the day.”