Sonata-form, otherwise known with similar inaccuracy as first movement form or sonata-allegro form, developed during the second half of the 18th century as a principal form in instrumental music, from Haydn onwards. The form is based on a triple division of a movement into exposition, development and recapitulation. The first section normally contains two contrasting subjects, the first in the tonic key and the second in the dominant key or in the relative major of a minor key movement. The section ends with a coda or codetta. The middle section, the development, offers varied treatment of themes or parts of themes that have already been heard. The recapitulation brings back the first and second subjects now in the tonic key. The movement ends with a coda. The form is used for all kinds of instrumental music, from sonatas to symphonies, and is expanded and varied in a number of ways.