Some history by Wiki:
The Motion Picture Production Code was the set of industry censorship guidelines which governed the production of the vast majority of United States motion pictures released by major studios from 1930 to 1968. It was originally popularly known as the Hays Code, after its creator, Will H. Hays.
The Motion Pictures Producers and Distributors Association (MPPDA), which later became the Motion Picture Association of America (MPAA), adopted the code in 1930, began effectively enforcing it in 1934, and abandoned it in 1968, in favor of the subsequent MPAA film rating system. The Production Code spelled out what was acceptable and what was unacceptable content for motion pictures produced for a public audience in the United States.
Provisions of the Code
The Production Code enumerated three "General Principles" as follows:
1. No picture shall be produced that will lower the moral standards of those who see it. Hence the sympathy of the audience should never be thrown to the side of crime, wrongdoing, evil or sin.
2. Correct standards of life, subject only to the requirements of drama and entertainment, shall be presented.
3. Law, natural or human, shall not be ridiculed, nor shall sympathy be created for its violation.
Specific restrictions were spelled out as "Particular Applications" of these principles:
Nakedness and suggestive dances were prohibited.
The ridicule of religion was forbidden, and ministers of religion were not to be represented as comic characters or villains.
The depiction of illegal drug use was forbidden, as well as the use of liquor, "when not required by the plot or for proper characterization".
Methods of crime (e.g. safe-cracking, arson, smuggling) were not to be explicitly presented.
References to alleged sex perversion (such as homosexuality) and veneral desease were forbidden, as were depictions of childbirth.
The language section banned various words and phrases that were considered to be offensive.
Murder scenes had to be filmed in a way that would discourage imitations in real life, and brutal killings could not be shown in detail. "Revenge in modern times" was not to be justified.
The sanctity of marriage and the home had to be upheld. "Pictures shall not imply that low forms of sex relationship are the accepted or common thing". Adultery and illicit sex, although recognized as sometimes necessary to the plot, could not be explicit or justified and were not supposed to be presented as an attractive option.
Portrayals of miscegenation (inter-racial marriage and procreation) were forbidden.
"Scenes of Passion" were not to be introduced when not essential to the plot. "Excessive and lustful kissing" was to be avoided, along with any other treatment that might "stimulate the lower and baser element".
The flag of the United States was to be treated respectfully, and the people and history of other nations were to be presented "fairly".
The treatment of "Vulgarity", defined as "low, disgusting, unpleasant, though not necessarily evil, subjects" must be "subject to the dictates of good taste". Capital punishment, "third-degree methods", cruelty to children, animals, prostitution and surgical operations were to be handled with similar sensitivity.