In Anglophone pre-collegiate schools, detention is a disciplinary action where students are required to stay in a designated room, keep calm, and do nothing for some amount of time. In fiction, detention is one thing where a well-to-do student does not want to go to. The other one is dodgeball. The room is run down and gritty, the teacher running the room is keeping a watchful eye on you and may make your stay a living heck, the desks are filled with bullies and delinquents, graffiti is everywhere, and there're decades-old gum beneath your desk. And heaven forbid if you spend your time in detention on a weekend.
Naturally, the student will find ways to get out of this heckhole, with the help of the delinquents of course. In real life, failing to show up on detention or bailing out can lead to an even more severe disciplinary action such as a longer detention period or suspension.
Can be the school equivalent to a Prison Episode (in which case, it may involve a Juvenile Hell). It can be a form of a Bottle Episode due to the nature of the room. Compare Standing in the Hall, the Japanese equivalent; After-School Cleaning Duty, When a student is made to clean school property after school; and Writing Lines, when a student is made to write something they are not supposed to do repeatedly.
- In Archie Comics, at least through the bronze age of comics, the titular character is frequently given detention, usually by Principal Weatherbee. Sometimes given for the pettiest issues, detention seems to be the school's punishment of choice, both for Archie and (less frequently) for other characters.
- The Breakfast Club is formed by five students from different cliques under detention on a Saturday.
- Detention: It's a comedy/horror teen film about a group of students who were sent to detention before prom night when their principal suspects that one of them is a slasher. Whacky hijinks ensue such as finding the slasher, one of which involves going back to 1992.
- In the Class (2016) episode "Detained", Quill puts all the regular pupils in detention so that she can go off on a secret mission. The detention room then gets transported to a very nasty part of space due to a Rift incident.
- The Dawson's Creek first season episode "Detention" had a classic The Breakfast Club scenario, with all four heroes - and Alpha Bitch Abbey stuck in the library together for hours on the weekend. Dawson The Movie Buff even lampshades this.
- The Community episode "Basic Rocket Science" is part this and part Parody Episode. The Detention part comes when the study group is punished for creating and submitting a design for the school flag with a hidden obscene image. The punishment is cleaning out a new space simulator acquired by the college. The Parody part comes when the simulator gets towed with them in it and they have to get back to the college, sending up numerous space exploration movies in the process.
- The Degrassi: The Next Generation episode "Take on Me," doubling as a Whole Plot Reference to The Breakfast Club.
- iCarly: In "iGot Detention", Sam gets detention around the same time she has to do the show, so Carly and Freddie deliberately get detention and host the show from there whenever Mr. Howard is out of the room.
- The Ned's Declassified School Survival Guide episode "Detention" has Ned and Cookie get detention for throwing a paper airplane in the hallway. Ned and Cookie then have to keep the teacher from leaving the room to keep themselves from being beaten up by the bullies
- Chapter 13 of Rock and Riot features the Jaquettes and Rollers in detention. Connie comes out, leading the rest of the cast to do so as well.
- In the SuperMarioLogan episode, "Robot Jeffy", Jeffy gets detention for dirtying his diaper and tossing it at Jackie Chu's face. Cody's robot, Codo, makes a robot of Jeffy named Jeffo to take Jeffy's place in detention so Jeffy can stay in his room and play video games. When Bully Bill bullies Jeffo, Jeffo enters Kill Mode and goes on a rampage.
- In "Arthur Accused!", Arthur gets a week of detention from Mr. Haney and Ms. Tingley when he is falsely accused of spending the funds for a new puppy for the fire department at the arcade, rendering him unable to attend the third grade annual picnic. It's up to Buster to investigate the disappearance of the funds and clear Arthur's name, especially considering that he was the one who inadvertently landed Arthur in detention in the first place.
- In "Arthur and the True Francine", Francine gets a week of detention when Mr. Marco accuses her of copying off Muffy's math test (when it was actually the other way around). This renders Francine unable to participate in a softball game against Mighty Mountain. After getting clobbered by Mighty Mountain in the softball game, Muffy tells Mr. Marco the truth and willingly takes her punishment of two weeks of detention so Francine can play.
- In The Amazing World of Gumball episode "The Lesson", Gumball and Darwin get caught by Principal Brown cheating on a math test, and have to spend the entire spring break in detention, which is portrayed like a maximum security prison, with Principal Brown acting like a warden, and a cupcake who literally "lost his cherry" in a riot. The brothers and one of the other students plan a Great Escape, but even after the former make it out, Brown points out they're just gonna have to come back the next day.
- Being Ian had one episode with Ian landing the whole class detention and his repeated attempts at escaping detention keep accumulating more hours for the rest of the class.
- In the pilot episode of ChalkZone, when Reggie Bullnerd picks on Rudy, Rudy draws a cartoon of "Bully Nerd" getting beaten up by Snap in retaliation. After Reggie uses Rudy as a human eraser, Mr. Wilter gives Rudy detention, forcing him to write "Cartoons Are Not Funny" on the chalkboard repeatedly. After Rudy's chalk breaks, the next one he finds is a piece of magic chalk, which sets the show's premise in motion.
- In the Clarence episode "Detention", Clarence gets sent to detention and discovers that Mr. Reece, the teacher in charge, falls asleep after eating donuts. The kids take advantage of this and turn the detention room into something akin to a nightclub.
- Dexter's Laboratory: The episode "Dexter Detention" involves Dexter getting sent to detention after accidentally yelling out a test answer in annoyance. It's overseen by a Sadist Teacher who insists the students are all criminals, has them Writing Lines constantly, and has any of them he deems troublesome shoved into a hole in the floor. This trope is turned on its head at the end, when Dexter and the other detention-birds dig their way out of the school...and into an actual prison.
- Detentionaire is a series worth of this. Falsely accused of causing a prank on the first day, Lee Ping is sent to detention for a whole year. To add insult to the injury, his mother who is also a teacher at his school grounds him for that. The series revolves around him and his friends to sneak out of detention and find out who the real culprit of the prank is.
- The Grim Adventures of Billy & Mandy: The episode "Detention X" has Grim becoming a substitute teacher and sending the class, Billy and Mandy included, into the Detention Dimension.
- In the Hey Arnold! episode, "Full Moon", Harold, Stinky, and Sid moon Principal Wartz. Arnold is the only witness, and because he refuses to rat them out, Principal Wartz gives Arnold 30 days of hard labor in detention. If Arnold confesses before the end of the deadline, Principal Wartz will lift his punishment, and if he doesn't, he will mark Arnold as a "Failure to cooperate" on his permanent record, but Arnold still refuses to rat his friends out. Near the end of the episode, Harold, Stinky and Sid's guilty consciences catch up with them and they confess what they did to Principal Wartz just before he can mark Arnold as a failure to cooperate.
- Kick Buttowski: The episode "Detained" has Kick and his friends getting detention, with Miss Chiccarelli, who already hates him with a burning passion, being hired to watch the room.
- Kim Possible: The first episode (in production order) "Tick Tick Tick" involves Kim getting detention for being late to class, which she believes will stain her status on the school's social hierarchy, as cheerleaders don't "do" detention. Her father helps her realize that she isn't above or below anyone else at school, and that she had to do the time because she broke the rules. She also ends up making friends with the other students there after previously writing them off.
- In the The Loud House episode, "Pulp Friction", Principal Huggins gives Lincoln and Clyde detention when he finds out that they have an idea for the next Ace Savvy comic book. Lincoln's sisters help bust Lincoln and Clyde out of detention to reach the post office in time for the contest's deadline. In the end, it is revealed that Principal Huggins deliberately gave Lincoln and Clyde detention until after the deadline to get them out of the way so that he could submit his own entry for the contest. When Lincoln and Clyde find out, they and Principal Huggins form an alliance and submit their conjoined entry.
- My Gym Partner's a Monkey: In "Basic Jake", it turns out Jake deliberately gets himself into detention every Saturday so he can sneak into the old A/V room and host his own TV show.
- The Simpsons:
- In "Bart the Lover", Bart gets a month's detention when he plays with a yo-yo in class and accidentally breaks the fish tank.
- The Treehouse of Horror segment "Nightmare Cafeteria" has detention being held in the cafeteria due to the normal room being stuffed to overflowing. After the teachers discover a taste for students, they start finding petty reasons to send their next meals into detention.
- In "Lisa's Date with Destiny", Lisa gets detention when Mr. Largo thought that she was disrupting class by laughing at the word "tromboner". What Lisa was really laughing at was Nelson spraying Groundskeeper Willie with a hose and misunderstanding what he was saying.
- In "The Way We Was," Homer and Marge met in detention. Homer (who was a regular in the detention hall) had been caught smoking in the bathroom, and Marge (who was in detention for the first time ever) was sent there for leading a women's rights protest on campus that involved burning a bra.
- In the Spongebob Squarepants episode, "New Student Starfish", SpongeBob brings Patrick with him to boating school, only for Patrick to constantly get him into trouble, culminating in both of them getting detention for having a (wimpy) fight in the hallway. While in detention, the light bulb that keeps Roger, the class' egg alive burns out, so SpongeBob and Patrick have to put their differences aside and work together to keep Roger warm and find a new light bulb to replace the old one.
- In the Star vs. the Forces of Evil episode "Girls' Day Out", Star is thrown into detention for releasing the class hamster. There, she is elected "Mayor" of detention and sets to work fulfilling the requests of the other students there. Most are easy; the last one, batteries for a TV remote, requires her to leave the room and sneak around the school.
- The episode "The Reckless Club" in Trollhunters centers around Jim and his friends being stuck in Saturday detention. The title is a parody of The Breakfast Club.