Most municipalities in the U.S. have adopted a set of building codes that establish standards for properties. The specificity of building codes ranges from requirements for ensuring a floor can bear an adequate load to the distance a toilet must be from the wall. They also regulate the number of floors each building can have, whether basement can be used as a living space, etc.
Building codes can vary from city to city, depending on differences in geography and climate, but they often follow similar standards and are accessible through your local government. However, despite being a part of every building process in incorporated municipalities throughout the country, they're often not well understood by property owners. Building code violations are treated seriously, as they may have serious impact on health and safety of the occupants of the premises; some building code violations can be charged as felonies. If you received a notice of a building code violation, or if you suspect you may be out of compliance, it’s best to consult an attorney to make sure you’re taking care of the problem.