legislation, the preparing and enacting of laws by local, state, or national legislatures. In other contexts it is sometimes used to apply to municipal ordinances and to the rules and regulations of administrative agencies passed in the exercise of delegated legislative functions.