Children are to learn about healthy relationships from age four, with sex education compulsory in all secondary schools, it has been confirmed.

Parents will still have the right to withdraw their child from the classes, while religious schools will still be able to teach sex education within the tenets of their faith, the government announced.

In a written statement, Education Secretary Justine Greening said that statutory guidance for sex and relationships education (SRE)- introduced in 2000 - had become 'increasingly outdated', failing to address issues that had become increasingly common, such as cyber bullying, sexting and online safety.

Under the move, all primary schools in England will have to teach age appropriate lessons about relationships, while secondaries will have to give classes in both sex and relationships.

Currently, sex education is compulsory only for secondary pupils in schools run by local authorities.

The change makes the subject mandatory in all schools, including academies, independent schools and religious free schools and extends the subject to include relationships and modern phenomena such as sexting.

'I am today announcing my intention to put relationships and sex education on a statutory footing, so every child has access to age appropriate provision, in a consistent way,' the minister said in her statement.

She also said she was intending to make personal, social and health education (PSHE) compulsory in the future, following further consultation on what it should include.

The statement said: 'The statutory guidance for sex and relationships education was introduced in 2000 and is becoming increasingly outdated.

'It fails to address risks to children that have grown in prevalence over the last 17 years, including cyber bullying, 'sexting' and staying safe online.

'Parents will continue to have a right to withdraw their children from sex education.

'Schools will have flexibility over how they deliver these subjects, so they can develop an integrated approach that is sensitive to the needs of the local community, and, as now, faith schools will continue to be able to teach in accordance with the tenets of their faith.'

• What do you think about the changes? Leave your comments below or email lauren.cope@archant.co.uk