Ofcom's Broadcasting Code governs what can be aired on TV and radio.
It's the rule book for TV channels and radio stations and sets standards for programmes which broadcasters have to follow.
The Code exists to protect viewers and listeners from harmful and offensive content but also ensures that broadcasters have the freedom to make challenging programmes.
For example, broadcasters can transmit provocative material – even if some people consider it offensive – as long as it’s editorially justified and the audience is given appropriate information.
The Code covers other areas like impartiality and accuracy, sponsorship and product placement as well as fairness and privacy.
The Code came into force in May 2005 and was initially drawn up to replace the codes Ofcom had inherited from its predecessors – including the Broadcasting Standards Commission and the Independent Television Commission.
It had to take into account the dramatic changes that had affected TV and radio. The UK was no longer a country with just four or five TV stations and the majority of homes now had access to many more digital TV and radio channels.
The Code was drawn up following extensive research amongst viewers, listeners and broadcasters – and we received more than 900 responses to our public consultation.
Since 2005 the Code has been revised a number of times. Ofcom has clarified rules around audience competitions and voting, amended rules on the broadcast of sexual material, and added new rules on product placement, and on hate speech and abusive content. In April 2017 certain sections of the Code were extended to cover BBC programmes.
The rules for regulated video on demand services cover material which is prohibited or restricted due to its adult nature or incitement to hatred, as well as product placement and sponsorship.
There's a whole section of the Broadcasting Code dedicated to protecting children from unsuitable content on TV and radio, including rules about the 9pm watershed on TV.
There are also rules about the times broadcasters choose to schedule their programmes, as well as restrictions on programmes broadcast before the watershed that include offensive language, violence, sexual material, and dangerous or harmful behaviour that children might try to copy.
The video on demand rules protect children from "specially restricted material", which is material that has been or would be classified in the R18 category by the British Board of Film Classification (BBFC)) or other material which might seriously impair the physical, mental or moral development of under-18s and "prohibited material" which has been, or would be, refused a classification by the BBFC).
Whenever viewers and listeners complain to us about a programme they've seen or heard, we assess it against our codes and rules.
If your complaint is about something you saw or heard in a BBC programme, you may need to complain to the BBC first. Here’s some more information about how we deal with BBC complaints.
If we find a programme has broken those rules, then we will write a decision recording the breach.
These decisions are published on our website in the fortnightly Broadcast and On Demand bulletin.
If a broadcaster or on demand provider seriously or repeatedly breaches our rules, we have legal powers to impose sanctions.
This could be a substantial fine, suspending a video on demand service or taking away a TV or radio broadcaster's licence to broadcast.
All of our sanctions decisions are published here.
Read the Broadcasting Code, which also includes the On Demand Programme Service Rules.