For the purpose of promoting the health, safety, morals, and general welfare of the community, cities of the first class are hereby authorized and empowered to regulate and restrict, by ordinance, 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 the location, use and occupancy of buildings, structures and land, for trade, industry, residence or other purposes, so that such uses may be permitted in or excluded from certain portions or sections of such cities, or subject to special regulations.
53 P.S. § 14752