In painting, a capriccio (Italian pronunciation: [kaˈprittʃo], plural: capricci [kaˈprittʃi]; in older English works often anglicized as "caprice"), means especially an architectural fantasy, placing together buildings, archaeological remains and other architectural elements in fictional and often fantastical combinations, perhaps with staffage of figures. It fits under the more general term of landscape painting. It may also be used of other types of work with an element of fantasy.
This genre was perfected by Marco Ricci but its best-known proponent was the artist Giovanni Paolo Pannini. This style was extended in the 1740s by Canaletto in his etched vedute ideale, and works by Piranesi and his imitators.
Later examples include Charles Robert Cockerell's A Tribute to Sir Christopher Wren and A Professor's Dream, and Joseph Gandy's 1818 Public and Private Buildings Executed by Sir John Soane. The artist Carl Laubin has painted a number of modern capriccios in homage to these works.
The term can be used more broadly for other works with a strong element of fantasy. The Capricci, an influential series of etchings by Gianbattista Tiepolo (1730s?, published in 1743), reduced the architectural elements to chunks of classical statuary and ruins, among which small groups made up of a cast of exotic and elegant figures of soldiers, philosophers and beautiful young people go about their enigmatic business. No individual titles help to explain these works; mood and style are everything. A later series was called Scherzi di fantasia - "Fantastic Sketches". His son Domenico Tiepolo was among those who imitated these prints, often using the term in titles.