Gilbert and Sullivan's comic opera H.M.S. Pinafore opens at the Opera Comique in London.

Comic opera, sometimes known as light opera, is a sung dramatic work of a light or comic nature, usually with a happy ending and often including spoken dialogue.

Forms of comic opera first developed in late 17th-century Italy. By the 1730s, a new operatic genre, opera buffa, emerged as an alternative to opera seria. It quickly made its way to France, where it became opra comique, and eventually, in the following century, French operetta, with Jacques Offenbach as its most accomplished practitioner.

The influence of the Italian and French forms spread to other parts of Europe. Many countries developed their own genres of comic opera, incorporating the Italian and French models along with their own musical traditions. Examples include German singspiel, Viennese operetta, Spanish zarzuela, Russian comic opera, English ballad and Savoy opera, North American operetta and musical comedy.

Gilbert and Sullivan refers to the Victorian-era theatrical partnership of the dramatist W. S. Gilbert (1836–1911) and the composer Arthur Sullivan (1842–1900) and to the works they jointly created. The two men collaborated on fourteen comic operas between 1871 and 1896, of which H.M.S. Pinafore, The Pirates of Penzance and The Mikado are among the best known.Gilbert, who wrote the libretti for these operas, created fanciful "topsy-turvy" worlds where each absurdity is taken to its logical conclusion—fairies rub elbows with British lords, flirting is a capital offence, gondoliers ascend to the monarchy, and pirates emerge as noblemen who have gone astray. Sullivan, six years Gilbert's junior, composed the music, contributing memorable melodies that could convey both humour and pathos.Their operas have enjoyed broad and enduring international success and are still performed frequently throughout the English-speaking world. Gilbert and Sullivan introduced innovations in content and form that directly influenced the development of musical theatre through the 20th century. The operas have also influenced political discourse, literature, film and television and have been widely parodied and pastiched by humorists. The producer Richard D'Oyly Carte brought Gilbert and Sullivan together and nurtured their collaboration. He built the Savoy Theatre in 1881 to present their joint works (which came to be known as the Savoy Operas) and founded the D'Oyly Carte Opera Company, which performed and promoted Gilbert and Sullivan's works for over a century.