The Dow and the S&P 500 dipped on Tuesday, recovering from earlier declines, as investors shrugged off weak consumer confidence data and focused on positive earnings reports.

Stocks in the healthcare sector led the market's afternoon rebound, with biotech shares up a day after Amgen's strong quarterly earnings report.

The health insurance sector also rose after Coventry Health Care's earnings topped Wall Street's estimates.

The U.S. consumer confidence index declined more than expected in July, a second consecutive monthly fall, as a sluggish labor market continued to worry consumers, the Conference Board said.

Strong earnings have given a second wind to a stock market rally that wilted in June after a 40 percent gain in the S&P 500 from its 12-year closing low in March.

We've seen an 11 percent rally in 2 weeks, said Tim Smalls, head of U.S. stock trading at Execution LLC in Greenwich, Connecticut.

He said that with the markets technically overbought, and looking for a reason to take a breather, the stock market's slight decline is a good performance.

Smalls added that a lot of the afternoon recovery was linked to a poor U.S. Treasury auction, as money shifted from bonds into the stock market.

Shorter-dated U.S. Treasury debt fell after weak results in an auction of a record $42 billion of two-year notes had some analysts wondering if the global appetite for U.S. government debt might be waning.

The Dow Jones industrial average <.DJI> shed 11.79 points, or 0.13 percent, to 9,096.72. The Standard & Poor's 500 Index <.SPX> dropped 2.56 points, or 0.26 percent, to 979.62.

But the Nasdaq Composite Index <.IXIC> gained 7.62 points, or 0.39 percent, to 1,975.51.

Amgen's stock rose 2.7 percent to $62.42 on Nasdaq following the company's release of much better-than-expected second-quarter earnings after Monday's closing bell. The Dow Jones biotechnology index <.DJUSBT> gained 1.8 percent.

Coventry Health Care shares rose 12.7 percent to $22.59 on the New York Stock Exchange after the company's earnings topped Wall Street's estimates and it lifted its full-year earnings forecast.

Aetna jumped 12.6 percent to $28.96 after at least three brokerages said the insurer's recently slashed 2009 earnings forecast is achievable. Aetna and Coventry pushed the Morgan Stanley Healthcare Payors index <.HMO> up 6.5 percent.

But the energy sector's shares weighed on the broader market as the weak consumer confidence data took a toll on oil prices, which had risen on optimism about the economic recovery. U.S. front-month crude futures dropped $1.15, or 1.7 percent, to settle at $67.23 a barrel. The S&P energy index <.GSPE> slid 1.5 percent.

Exxon Mobil Corp , down 1.2 percent at $71.89, was the top drag on the Dow industrials.

Office Depot , the No. 2 U.S. office supply retailer, reported a bigger-than-expected quarterly loss as the recession bit into demand from corporate customers. The stock tumbled 18.1 percent to $4.38.

U.S. Steel Corp shares fell 2.2 percent to $40.35 after the company reported a quarterly loss and said it expected all of its business sectors to operate in the red in the third quarter.

Earlier on Tuesday, Standard & Poor's/Case-Schiller released data that showed U.S. single-family home prices rose in May from April, the first monthly increase in three years.

(Editing by Jan Paschal)