Tony Blair made the announcement in his Sedgefield constituency, where he linked Trimdon primary school to the Public Record Office in Kew, London, with a website that will give schools access to historical records.
All schools would have computer links to the great museums and libraries of the world by the next election.
His promise, which includes pounds 450m of extra money, will increase government spending on information technology in schools to pounds 1bn by 2002.
All schools, libraries, colleges and universities should be online by 2002 and administrative paperwork in schools should mostly be replaced by information technology, Mr Blair said. "To be productive, Britain needs to become a knowledge-driven economy. Every child, not just those who can afford it, must leave school able to use new technology." David Blunkett, Secretary of State for Education, answered criticism that pupils without a computer at home would be at a disadvantage.
After-school study centres at a quarter of primary schools would have computers. Ministers are well aware that computers alone will not raise educational standards, Mr Blunkett said.
"It is important that we educate both teachers and pupils in when not to use technology as when and how to use technology."
The National Lottery has already provided pounds 300m to train teachers to use information technology. Surveys suggest only one in five teachers is computer literate. The National Grid for Learning is already operating and includes lesson plans, advice on how to teach literacy and numeracy and how to set improvement targets.
Nigel de Gruchy, head of the National Association of Schoolmasters/Union of Women Teachers, welcomed the "massive resources" being made available for information technology but added: "The Government must be careful not to place too much reliance upon IT to the neglect of the vital contribution that teachers have to make.
"Teachers must ensure that basic literacy and numeracy receive their due attention and that pupils are educated rather than simply occupied with computers.
"Many teachers will wonder why on earth the Government pleaded poverty in refusing to pay them their 1998 pay rise in full on time, despite the recruitment crisis. We could end up with a surplus of computers but a shortage of teachers."
But John Dunford, general secretary of the Secondary Heads Association, said the money was being well spent.
He added: "Computers represent a huge resourcing problem for schools, partly because they go out of date more quickly, for instance, than history books."Reuse content