For two decades, Yahoo’s logo has carried an exclamation point. Recently, that’s been more of a question mark.

And now, make that a period: In a deal with Verizon, Yahoo announced Monday that it is selling the Internet businesses that made it famous for $4.83 billion.

Verizon, which bought AOL for $4.4 billion last year, is increasing its bet on online advertising and media, betting on Yahoo’s still-substantial traffic and advertising technology to diversify its revenue.

The transaction includes Yahoo’s real estate, but not a bundle of patents it’s selling separately. Those and the stakes in Asian Internet businesses that have long accounted for most of Yahoo’s value to shareholders will remain, under a new name yet to be unveiled.

The acquisition comes after a long slide in relevance for the Sunnyvale Internet pioneer. CEO Marissa Mayer came in four years ago promising to hire new people, introduce new products, and stem a slide in its share of the online advertising market. The people and products arrived, but most of Yahoo’s users showed up for products like email, search and news first introduced nearly two decades ago. As Google and Facebook wooed both consumers and advertisers, Yahoo’s sales slipped.

The deal caps months of talks with potential buyers, a list rumored to include AT&T and Quicken Loans co-founder Dan Gilbert. Verizon was seen by many as the front-runner. Verizon, dependent on telephone services for most of its revenue, has been looking to diversify through digital advertising and online video. Under the deal, Verizon will now have more than 25 brands in its combined portfolio, including Yahoo Sports and the Huffington Post.

“The acquisition of Yahoo will put Verizon in a highly competitive position as a top global mobile media company, and help accelerate our revenue stream in digital advertising,” said Lowell McAdam, Verizon’s CEO, in a press release.

Verizon has 100 million wireless subscribers today. But it hopes to reach far more people with online ads by 2020: AOL CEO Tim Armstrong has set a goal of having an audience of 2 billion people by 2020. Yahoo gets the company halfway there. By spending more than $9 billion on AOL and Yahoo, Verizon may be able to provide advertisers an alternative to Google and Facebook, analysts said.

In an email to employees, Mayer said she plans to remain at the helm of Yahoo for now. Under Mayer, Yahoo invested heavily in apps, buying smaller companies and discarding their products simply to bolster the company’s ranks of mobile engineers. Yahoo’s mobile audience grew from 350 million monthly users in 2013 to 600 million in 2016. The company also acquired dozens of promising tech businesses, but some analysts said they have yet to see a return on those investments, particularly in its largest purchase of blogging site Tumblr. Yahoo spent $1.1 billion to buy Tumblr in 2013, but wrote off nearly two-thirds of the purchase price this year.

Mayer has pointed out that roughly $1.6 billion in annual revenue from mobile, social, video and native advertising didn’t really exist prior to her leadership. What she does not readily admit: That revenue has not made up for a substantial slide in conventional banner ads.

Over the years, Yahoo failed to boost its market share in digital advertising and is projected to take a smaller slice of the nation’s digital ad revenues in the future, according to research firm eMarketer. This year, eMarketer estimates Yahoo will garner just 3.4 percent of the U.S. digital ad revenue market, down from 5.1 percent in 2014.

Google takes the bulk of U.S. digital ad revenue, at nearly 39 percent of the market, followed by Facebook at 15 percent, according to eMarketer.

SunTrust Robinson Humphrey analyst Robert Peck has called Yahoo’s core business a “melting ice cube.” Disguising its decline has been the rising value of its stakes in Chinese e-commerce firm Alibaba and Internet company Yahoo Japan.

Investors have pressured Yahoo to sell its core business after an attempt to spin off its Alibaba investment risked saddling shareholders with a big tax bill. In March, New York hedge fund Starboard Value threatened to wage a proxy battle to oust the company’s board due to concerns about how serious the board was with exploring a sale and criticized Mayer’s management of the company. In April, Starboard settled with Yahoo for four seats on the company’s board.

An AOL representative did not respond to questions on the deal’s impact on Yahoo employees. Even after rounds of layoffs, Yahoo has about 9,000 employees worldwide and nearly 4,000 in the Bay Area.

A Yahoo spokesman said Mayer’s role after the acquisition and Verizon’s plans for Yahoo employees and its Sunnyvale headquarters are still being discussed. Yahoo will move forward on plans for developing its products, the spokesman said.

Mayer had once talked about returning Yahoo to the greatness it enjoyed during the ’90s, when co-founders Jerry Yang and David Filo landed on the covers of magazines and the company’s value soared to $125 billion. She told Charlie Rose in an interview that she wished to have three more years as CEO. But in recent months, after apparently resisting a sale, she’s seemed to concede its inevitability.

“It was a tough situation she came into,” said Dave Leopold, who owned roughly 50,000 Yahoo shares as of June. “She worked really hard at it, but she didn’t get the job done. The best thing is to sell it off.”

In a call with investors, Mayer called the Verizon deal an “exceptional outcome for Yahoo shareholders.” Executives said there was a high level of interest from various parties and that they were focused on maximizing shareholder value. The company considered factors like price, terms and the certainty to close the deal. Yahoo Chief Financial Officer Ken Goldman did not directly answer a question as to whether Verizon placed the highest bid.

The deal is expected to close early next year and is subject to shareholder and regulatory approvals. Marni Walden, Verizon’s president of product innovation and new business organization, will oversee Yahoo’s integration with AOL, Verizon said in a press release.

The exclamation point is definitely gone. But this period may be followed with new question marks.

Wendy Lee is a San Francisco Chronicle staff writer. Email: wlee@sfchronicle.com Twitter: @thewendylee