The cold open - a feature on TV shows where there is a scene preceding the opening titles - has become a staple of television in recent years, offering teasing introductions, mysterious provocations and, most commonly of all, amusing skits before the bulk of an episode gets underway.
Sometimes these sketches are divorced from the narrative of the show entirely (most cold opens of The Office and Brookyln Nine-Nine fit this bill), other times they are offer set-up to the main plot (It's Always Sunny in Philadelphia). They vary greatly in length, too, with the cold opens of shows like Malcolm in the Middle clocking in at barely 30 seconds, and others lasting several minutes. Some episodes of Monty Python's Flying Circus didn't show the opening credits until the end of the show - those guys deserve a medal for the longest cold opens ever.
It isn't just comedies that use cold opens to hilarious effect, though; some serious drama shows have used the introductory slot for scenes of less serious import, to give the viewers a glimpse of the characters' lives outside of the tense demands of drama.