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