The most widely anticipated pregnancy since Princess Diana’s in 1981 is official: Prince William’s wife, Kate, is pregnant. St. James’s Palace announced the pregnancy Monday, saying that the Duchess of Cambridge — formerly known as Kate Middleton — has a severe form of morning sickness and is currently in a London hospital. William is at her side. The news drew congratulations from across the world, with the hashtag ‘‘royalbaby’’ trending globally on Twitter. The couple’s first child will be third in line to take the throne — leapfrogging the gregarious Prince Harry and possibly setting up the first scenario in which a female heir could benefit from new gender rules about succession. The palace would not say how far along the pregnancy is, only that it has not yet reached 12 weeks. Palace officials said the duchess, 30, was hospitalized with hyperemesis gravidarum, a potentially dangerous type of morning sickness where vomiting is so severe no food or liquid can be kept down. They said she was expected to remain hospitalized for several days and would require a period of rest afterward. The condition is thought to affect about one in 200 pregnant women, according to Britain’s health department. The news came just days after the duchess, on a royal appearance, played field hockey with children at her former school, St. Andrew’s in Berkshire. The palace said the royal family was ‘‘delighted’’ by the news. Prime Minister David Cameron admitted he got a heads-up about the pregnancy, saying he found the news ‘‘quite difficult’’ to keep to himself and expressing his confidence the couple will make ‘‘absolutely brilliant parents.’’ The leaders of the United Kingdom and the 15 former colonies that have the monarch as their head of state agreed in 2011 to new rules that give females equal status with males in the order of succession.