Contempt of Court
Section 17 of the Judiciary Act of 1789 vested U.S. courts with the power “to punish by fine or imprisonment, at the discretion of said courts, all contempts of authority in any cause or hearing before the same.”
Under English common law, courts had intended the power to punish individuals who showed contempt for their authority on the theory that such contempts were contempts of the king. In the U.S. system of government, civil contempts are directed at individuals who refuse to do something that a court has ordered done for the benefit of another party; complying with the order usually settles the issue at hand. Criminal contempts, which are more likely to raise First Amendment issues, involve trespassing against the dignity of the court itself.
Courts now limit contempt citations for criticism when necessary to avoid “clear and present danger”
Modern cases suggest that courts can only issue contempt citations for criticism directed against their judgments when such citations are necessary to avoid a “clear and present danger” of substantive evils.
In-court declarations pose more obvious threats to courtroom decorum than statements made outside court and are more likely to involve conduct than mere speech. At the same time, they must be balanced against the obligations of attorneys to represent their clients vigorously.
In Eaton v. City of Tulsa (1974), the Court reversed the contempt conviction of an individual who had referred to his assailant as “chicken shit,” but had not directed similar language to the judge or other court personnel.
https://firstamendment.mtsu.edu/article/contempt-of-court/#