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 internet porn and 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."
Ms Greening later said: "It is time to make this change to ensure all children and young people have access to these subjects and to update the current statutory guidance for relationships and sex education which was introduced nearly 20 years ago, in 2000.
"We need high quality, age appropriate content that relates to the modern world, addressing issues like cyber bullying, 'sexting' and internet safety."
The move was welcomed by school leaders and campaigners.
Russell Hobby, general secretary of the National Association of Head Teachers (NAHT), said: "We welcome the announcements made today.
"We have long advocated age appropriate sex education and PSHE, for all pupils in all schools, to help prepare young people for the challenges they will encounter in their adult lives and the current challenges they face beyond the school gates.
"It is so important for young people to be taught about appropriate relationships, and the duties set out today bring that one step closer.
"NAHT has long argued that SRE is best fulfilled as part of statutory PSHE, and we welcome the announcement of a review into the shape of this."
The Bishop of Ely, the Rt Revd Stephen Conway, the Church of England's lead bishop on education, said every parent and teacher wanted the best for children and for them to be safe in a changing world, adding that many people, including many Christians, were concerned about what might be taught in schools, and whether children could be exposed to too much too young.
But he added: "It is becoming increasingly clear that what might have held in previous eras is no longer the most effective way of keeping our children safe and preparing them for life in the world in which they live.
"In an age when even primary school children are becoming exposed to online pornography, often by accident, and when practices such as 'sexting' are becoming commonplace at a younger and younger age, we cannot simply advocate an approach like the three monkeys coverings their eyes, ears and mouths, vowing to see, hear or speak no evil."
He added: "I believe there is a need for carefully targeted and age appropriate relationship education for children from primary school."
Jonathan Baggaley, chief executive of the PSHE Association, said: "This is a historic first step and a clear statement of intent from government.
"Following years of campaigning we are delighted that Justine Greening has taken this vital step to respond to the calls from parents, teachers and young people for all children in all schools to be prepared for the opportunities and challenges of modern life."
In primary schools, the focus would be on building healthy relationships and staying safe, the Department for Education (DfE) said, adding that as children got older it was important that they understood healthy adult relationships in more depth.
The Government will hold discussions on what should be taught to children, and at what age, and there will be a full public consultation later this year.
Schoolchildren could be taught the new curriculum from as soon as September 2019, the department said.