An ordinance is a law passed by a municipal government. A municipality, such as a city, town, village, or borough, is a
political subdivision of a state within which a municipal corporation has been established to provide local government to a population
in a defined area.
Ordinances constitute the subject matter of municipal law. The power of municipal governments to enact ordinances is derived from the state constitution or statutes or through the legislative grant of a municipal charter. The charter in large part dictates how much power elected officials have to regulate actions within the municipality. Municipalities that have been granted "home rule" charters by the legislature have the most authority to act. If, however, a municipality enacts an ordinance that exceeds its charter or is in conflict with state or federal law, the ordinance can be challenged in court and ruled void.