The Hayes Code, officially known as the Motion Picture Production Code, was a set of industry moral guidelines that governed the production of films in the United States from 1930 until the late 1960s. This code sought to ensure that films adhered to certain moral standards, often restricting content related to sexuality, crime, and controversial social issues. Its influence extended to television and shaped how LGBTQ+ characters and themes were portrayed, often leading to censorship or avoidance of such representations in media.