The German term Volksschule generally refers to compulsory education, denoting an educational institution every person (i.e. the people, Volk) is required to attend.
In Germany and Switzerland it is equivalent to a combined primary (Grundschule and Primarschule, respectively) and lower secondary education (Hauptschule or Sekundarschule), usually comprising mandatory attendance of nine years. In Austria, Volksschule only refers to primary school lasting four years. In the Nordic countries, they were referred to as folkskolen; the Finnish term kansakoulu is a direct translation; these schools covered the first years of primary education, from the ages of 7 to 11 or 12.
In medieval times, church schools were established in the Holy Roman Empire to educate the future members of the clergy, as stipulated by the 1215 Fourth Council of the Lateran, later adopted by the sunday schools of the Protestant Reformation. First secular schools followed during the pietism movement from the late 17th century onwards and were further promoted by the advocates of the Enlightenment. In 1717 King Frederick William I of Prussia decreed the compulsory education of children from the age of five to twelve. They had to be able to read and write and were obliged to memorise the Protestant catechism. In 1763 King Frederick the Great enacted a first Prussian general school law, elaborated by the theologian Johann Julius Hecker.
Similar Volksschulen were established in the Electorate of Saxony and in the German-speaking parts of the Habsburg monarchy, backed by Johann Ignaz von Felbiger, through a system of state-supported primary one-room schools. Attendance was supposedly compulsory, but a 1781 census reveals that only one fourth of school-age children attended. At the time, this was one of the few examples of state-supported schooling. Sending one's children to school was binding by law only from 1840 in the Austrian Empire.