The Yahoo headquarters in Sunnyvale, Calif. Over the years, the company saw its best software engineers leave for other tech firms, hobbling its ability to adapt to trends and create products that would keep up with consumers’ tastes. (Marcio Jose Sanchez/AP)

Yahoo strove for the past two decades to build one of the most visited sites in the country and a robust online display advertising business.

It succeeded at both.

But its status as the third-most-visited website has translated into little more than a dimming outlook for the company that defined innovation in the early years of the Internet. Today, all those pairs of eyeballs — more than 200 million of them look at the site every month in the United States — have only made it a more attractive prospect for financial firms that want to break it up. Investors have little confidence that Yahoo can stand on its own.

On Tuesday, executives said they would continue to explore a sale of the company and expand mobile and video advertising, even as Yahoo reported that revenue had fallen by 11 percent over the past year.

So what went wrong?

Yahoo chief executive Marissa Mayer says that her efforts have “forged a Yahoo that is stronger and more modern” than before. (Eric Risberg/AP)

Some in the tech industry say the roots of Yahoo’s problems were seeded long ago. As Google and Facebook were winning the war for advertising dollars, Yahoo saw a steady stream of its best software engineers leave for brighter prospects in Silicon Valley. Without that talent, the company struggled to build viral products that kept up with consumer trends.

In the end, Yahoo was able to bring in massive numbers of viewers to look at interesting content and use its popular email service. But it hasn’t been able to make enough money off of them to satisfy Wall Street.

“They have a lot of traffic, but they’ve gotten to the point where many people have just lost their patience. They are a shadow of their former selves,” said Rob Leathern, chief executive of Optimal, a digital ad company.

Other analysts add that the company failed to adapt quickly enough to the two major trends of the consumer Internet: the rise of social networks and the exploding popularity of mobile devices. The latter was perhaps the most brutal for Yahoo. Display ads do not translate well on small screens, and consumers spend much more time on apps than they do surfing the mobile Web. Yet, with the exception of Yahoo Mail, Yahoo’s mobile apps never became big hits for iPhone or Android users.

Today, despite substantial investments in mobile products by Yahoo chief executive Marissa Mayer, the company’s apps do not rank among the top 50 in Apple’s app store in the United States, according to analytics company App Annie. By comparison, Google and Facebook together own eight of the top apps in the United States, according to Nielsen. In addition, mobile advertising generated just $250 million in revenue for Yahoo in the past quarter. Facebook made $4.5 billion from mobile ads in the last three months of 2015.

On Tuesday, Mayer laid out her latest attempt to save Yahoo. On an earnings call, she said she would continue to focus on mobile advertising, which has grown 11 percent since last year, adding more video ads and providing more sophisticated data to advertisers. She added that the company would shed real estate in places including Burbank and Santa Clara, Calif., Milan and Dubai, sell off patents it no longer needs, and close seven digital magazines in travel, food and parenting.

The company reported a net loss of $99 million, compared with a profit of $21 million for the same quarter last year. The results were slightly better than Wall Street expectations. The stock rose about 1 percent in after-hours trading.

Britain's Daily Mail is in talks with potential partners to mount a joint bid for Yahoo's internet assets. (Reuters)

Mayer said that her efforts, which included growing a mobile audience to 600 million monthly users around the world “from scratch,” had “forged a Yahoo that is stronger and more modern” than before.

But investors in the company still expect the core business to be sold. In a CNBC interview Tuesday, Jeffrey Smith, chief executive of the Starboard Value hedge fund, said he would continue to pressure Yahoo to sell its core business. His firm has proposed replacing Yahoo’s entire board at the company’s next shareholder meeting this summer.

Several suitors have expressed interest. Acquiring Yahoo could instantly turn a relatively small media company — or even a medium-size one — into one of the biggest sites in the world. Only Google and Facebook command bigger audiences than Yahoo.

Verizon has expressed interest in Yahoo and is frequently mentioned by analysts as a leading prospective bidder. Verizon, better known as a phone company, is aggressively aiming to become an Internet business in its own right. Last year, it bought AOL for $4 billion and is using its technology to improve how the company places ads on online video and other digital content. AOL counted 174 million unique visitors in November, according to ComScore.

But a sale of Yahoo would be a dramatic letdown for company executives. Just four years ago, they laid out a purple carpet for Mayer on her first day as chief executive. The press fawned over the new rock-star CEO, and the company’s stock rose steadily for two years — propped up by Yahoo’s multibillion-dollar stake in Chinese e-commerce conglomerate Alibaba and optimism that the “Geek Goddess” could restore the floundering firm’s greatness in the smartphone era.

That warm reception is long over. Today, Yahoo is likely to fetch a price lower than all the money Mayer spent trying to transform it.

Initially, Mayer tried to put down a stake in social, buying microblogging platform Tumblr for $1.1 billion in 2013. It looked like a promising bet. Announcing the acquisition, Mayer estimated that the addition of Tumblr could grow Yahoo’s audience by 50 percent. Tumblr’s audience numbers have ticked upward, and Mayer has put ads on the formerly ad-free platform. But the acquisition has been a negligible revenue generator for the company. Recently, Yahoo disclosed in a regulatory filing that it may write down all of Tumblr’s value.

Mayer also plowed ahead with the goal of capturing eyeballs and revenue on mobile devices. When she took the job, Yahoo reportedly had fewer than 100 engineers working on mobile products — compared with thousands at Facebook — and had yet to build a mobile version of its email product, which processed 30 billion emails a day. Mayer dove into improving those products, but, aside from Yahoo Mail, the results haven’t gotten significant traction among consumers.

Another high-profile attempt to attract audiences didn’t work as planned. In 2013, Mayer hired network news star Katie Couric as Yahoo’s first “global news anchor,” paying her $10 million a year. The move was part of a broad strategy to bring on high-wattage talent from the news industry. But the audiences didn’t come in large numbers, effectively depressing Mayer’s strategy to sell higher-priced video ads.

Today, Couric’s videos are not commonplace on smartphones and other mobile devices.

“It was a tough hand,” said Jason Kint, chief executive of Digital Content Next, a trade group representing publishers including Conde Nast, ESPN and NBCUniversal. “They weren’t born with great content, and they were trying to compete with Facebook and Google.”

Brian Fung and Hayley Tsukayama contributed to this report.