Children should be taught about the dangers of “sexting” and pornography at school, the first official guidelines for online education say.

The Department for Education is publishing an advice document that stipulates which topics should be covered when teaching pupils about technology and the internet.

In lessons, teachers could explain what sorts of online activities are illegal, particularly where it may be seen as “normal” behaviour among youngsters, such as “youth-produced sexual imagery” otherwise known as “sexting”.

“This could include copyright, sharing illegal content such as extreme pornography or terrorist content, as well as the illegality of possession, creating or sharing any explicit images of a child even if created by a child,” the guidance says.

Children could also be taught how to spot fake websites and how games encourage users to keep playing. Different types of online abuse such as sexual harassment, bullying, trolling and intimidation could also be covered.

Under legislation passed in 2017, age-appropriate relationship education is to become compulsory in all primary schools, while sex and relationship education is compulsory in secondaries.

Speaking at the NSPCC annual conference today, Damian Hinds, the Education Secretary, will say: “I have seen some online companies arguing that children should be treated as adults online once they pass the age of 13.