LONDON — One of Britain’s youngest Internet entrepreneurs has hit the jackpot after selling his top-selling mobile application Summly to search giant Yahoo.

Seventeen-year-old Nick d’Aloisio, who dreamed up the idea for the content-shortening program when he was studying for his exams, said he was surprised by the deal. As with its other recent acquisitions, Yahoo didn’t disclose how much it is paying for Summly, although British newspapers suggested the deal’s value at several million dollars.

“I would have never imagined being in this position so suddenly,” he wrote on his website, before thanking his family, his school — and his venture capitalist backer Li Ka-Shing — for supporting him.

Summly works by condensing content so readers can scroll through more information more quickly — useful for the small screens of smartphones.

The deal announced Monday is Yahoo’s fifth small acquisition in the past five months. All of them have been part of CEO Marissa Mayer’s effort to attract more engineers with expertise in building services for smartphones and tablet computers, an increasingly important area of technology that she believes the Internet company had been neglecting.

Although the Yahoo acquisition won’t close until later this spring, D’Aloisio said the Summly will no longer be available. Summly’s technology will return in other Yahoo products, he said.

D’Aloisio will work for Yahoo in its London office — in part so that he can complete his high school exams. Two other Summly workers will join Yahoo at its Sunnyvale, California, headquarters.

D’Aloisio is younger than Yahoo, which was incorporated in March 1995.