Image caption CBBC launched a new logo in 2016, with the help of popular character Hacker T Dog

The BBC is to spend an extra £34m on children's content over the next three years.

The investment comes as plans were announced to reinvent the corporation "for a new generation" and combat competition from media giants like Netflix and Amazon.

Director general Tony Hall said it was "the biggest investment in children's services in a generation".

The funding was unveiled as part of the BBC's first Annual Plan.

Setting out the BBC's ambitions for the coming year, the extra money for children's content is going to be invested across the three years to 2019-20.

'Biggest investment for generation'

Lord Hall said: "Our ambition to reinvent the BBC for a new generation is our biggest priority for next year. Every part of the BBC will need to contribute to meeting this challenge."

The new investment, delivered following savings made across the BBC, will see the budget for children's programming reach £124.4m by 2019-20, up from the current figure of £110m.

In the three years, £31.4m will be spent online on content that will include video, live online programme extensions, blogs, vlogs, podcasts, quizzes, guides, games and apps.

Image copyright Alamy Image caption The BBC's children's services are based in Salford

Lord Hall said it was "the biggest investment for a generation" and will "increasingly offer a personalised online offering for our younger viewers".

The BBC said it wants to respond to changes to the way children "are watching and consuming programmes", adding: "Investment in British content - particularly for the young - is vital, unless we want more of our culture shaped and defined by the rise of West Coast American companies."

Analysis

By David Sillito, media and arts correspondent

Over the last six years, children's TV viewing has dropped by more than a quarter.

Youngsters now spend more time online than they do in front of the television, around 15 hours a week. Even pre-schoolers spend more than eight hours a week online, according to Ofcom.

Naturally then, the CBBC channel aimed at six to 12-year-olds has seen a drop in its audience, and increasingly children are choosing to use the BBC's iPlayer.

Viewing habits are changing, but so too is the content they are watching. Shorter video clips, interactive content and games are all going to increase.

The setting for all of this is a long-term decline in spending on British children's programmes by other broadcasters - ITV's programming went from 424 hours in 1998 to 64 in 2013 - and the dominance of US programming.

This will only increase in an online world dominated by the tech giants. Children's culture is being shaped by firms based on the west coast of America.

The annual plan also explains how the BBC is aiming to tackle such challenges as "fake news" with BBC News's Reality Check being expanded to fact-check social media claims, and work being done alongside Facebook to build trust.

It also shows how the corporation will "rise to the challenge of better reflecting and representing a changing UK" and how it is focusing on personalisation.

The BBC's creative plans for the next 12 months also include:

A major season across TV, radio and online called Civilisations which will tell the story of art up to the present day

A year-long season of science and technology programmes called Tomorrow's World

Hull will continue to be showcased as UK City of Culture 2017

The annual plan is not the same as the BBC's annual report, which looks back over the previous year's performance and publishes details about the corporation's finances and spending. That report is expected later this month.

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.