The board of supervisors may enact and enforce codes and ordinances to govern and regulate the construction, alteration, repair, occupation, maintenance, sanitation, lighting, ventilation, water supply, toilet facilities, drainage, use and inspection of all buildings and housing constructed, erected, altered, designed or used for any use or occupancy and the sanitation and inspection of land in accordance with Article XVII-A.
53 P.S. § 66517