The chalkboard gag is a running visual joke that occurs during the Opening Sequence of many episodes of The Simpsons. In this gag, Bart Simpson is writing a unique phrase on the chalkboard repeatedly; when the school bell rings, he immediately stops writing and runs out of the classroom. The phrase is usually in the form of an admonishment, implying that Bart has been assigned this task as punishment in detention for some misbehavior left partly to the viewer's imagination.

Several of the gags have been show to be crimes in the U.S. (e.g. ""Bart Bucks" are not legal tender" (counterfeiting which is a class C felony))

The chalkboard gags are usually written in upper case (with the exception of the words "eBay," in which Bart wrote a lower case "e" and "ay", and "iPODDY," where the "i" is lower case.)

While running visual jokes in The Simpsons are rarely referred to by the content of the show itself, in the episode "Skinner's Sense of Snow", Bart says that he had written on the chalkboard so many times that his hands sound like a cement mixer. In another episode ("Marge vs. Singles, Seniors, Childless Couples and Teens and Gays"), Bart asks for a detention but Ms. Krabappel said they all got tired of that years ago, referencing the reduced number of gags in the openings. In the episode "Bart the Murderer", Bart is inspired by Fat Tony and attempts to bribe his principal, Mr. Skinner. In the next scene, Bart is seen writing "I will not bribe Mr. Skinner" on the chalkboard, monitored by the principal himself.

Lisa has been punished with the chalkboard twice, once in the episode "Lisa's Date with Density". As she writes, she complains, "How does Bart do this every week?" The second time was in "Grift of the Magi." When Bart finds out, he malapropism, "The ironing is delicious."

In the early days of the series, a chalkboard gag was used in almost every episode, but, as commercial time has increased, they have gradually disappeared. They are now shown as rarely as twice per season. The show's producers have said that they may soon disappear altogether. However, they seem to be making a comeback as there were eight chalkboard gags during season 17 including three in a row during the last three episodes of the season. The 4th season, the 11th season and the 12th season are the only seasons to use chalkboard gags in each episode (excluding the Treehouse of Horrors).

A chalkboard gag was also used in The Simpsons Movie. Bart can be seen writing "I will not illegally download this movie." on the chalkboard at school. As a follow-up, the chalkboard gag on the Season 19 premiere episode, He Loves to Fly and He D'ohs, which immediately follows the Simpsons Movie, shows Bart writing, "I will not wait 20 years to make another movie."