Mozart's music, like that of Haydn, is the very best of what is known as the Classical style. At the time he started to compose, the Baroque period was just coming to an end. Tastes were changing in music. Form, balance and elegance were thought of as more important than counterpoint. Mozart was the first great composer to write music for the piano, an instrument which had only just become popular. He wrote almost every kind of music: symphonies, operas, solo concertos, chamber music, especially string quartets and string quintets, and the piano sonata. He also wrote a lot of religious music, including masses, as well as popular music like dances, divertimenti and serenades.