To regulate and restrict the height, number of stories and sizes of buildings and other structures, the percentage of lot that may be occupied, the sizes of yards, courts and other open spaces, the density of population and the location and use and extent of use of buildings and structures and land for trade, industry, residence or other purposes.