Sex and relationships education is to become compulsory in all of England's schools, Education Secretary Justine Greening has confirmed.
Under the move, all primary schools will have to teach age appropriate lessons about relationships, while secondaries will have give classes in both sex and relationships.
In a written statement, Ms Greening said statutory guidance for sex and relationships education was introduced in 2000 and is becoming "increasingly outdated", failing to address issues that have increasingly common, such as cyber bullying, sexting and online safety.
Parents will still have the right to withdraw their child from the lessons, Ms Greening said.
"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 that she is 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."
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.
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.
"We look forward to playing our part in ensuring SRE/PSHE delivers for young people."
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.
"We look forward to working with Government and schools to ensure the implementation of these aims meets the needs of children and young people."
In primary schools, the focus will be on building healthy relationships and staying safe, the Department for Education (DfE) said, adding that as children get older it is important that they understand 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.
Ms Greening said: "Relationships and sex education and PSHE teach children and young people how to stay safe and healthy, and how to negotiate some of the personal and social challenges they will face growing up and as adults.
"These subjects form part of the building blocks young people need to thrive in modern Britain. At the moment, too many young people feel they don't have the relationships and sex education they need to stay safe and navigate becoming an adult.
"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."