A municipality may, by ordinance adopted by its governing body,
- (1) prescribe minimum standards for the use and occupancy of dwellings inside its boundaries;
- (2) prevent the use or occupancy of a dwelling that is injurious to the public health, safety, morals or welfare; and
- (3) prescribe punishment for the violation of the ordinance.