In primary schools children will be taught about healthy relationships.
Education Secretary Justine Greening said the government will make the changes to the Children and Social Work Bill.
Greening 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"
Regulations and statutory guidance will then be subject to full public consultation before being introduced.