The Dow industrials and the S&P 500 slipped on Tuesday as signs of a strong economic recovery were put to the test by a large drop in consumer confidence and disappointing quarterly results from Office Depot and U.S. Steel, among other companies.

But the Nasdaq edged higher, buoyed by gains in the biotechnology sector a day after Amgen's strong quarterly earnings report.

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.

Amgen shares rose 3.2 percent to $62.70 following the company's release of much better-than-expected second-quarter earnings after Monday's closing bell. The Dow Jones biotechnology index <.DJUSBT> rose 2 percent.

But the energy sector's shares weighed on the broader market as the weak consumer confidence data took a toll on oil futures 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.9 percent.

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

With the price of oil and other commodities retreating, the market is taking a bit of a breather, said Craig Miller, vice president of healthcare trading at Stifel Nicolaus in Baltimore.

He said the weak consumer confidence data gave investors a reason to sell some shares, while Amgen's results were bolstering biotech stocks.

The Dow Jones industrial average <.DJI> slipped 32.42 points, or 0.36 percent, to 9,076.09. The Standard & Poor's 500 Index <.SPX> fell 4.66 points, or 0.47 percent, to 977.52. But the Nasdaq Composite Index <.IXIC> edged up 1.30 points, or 0.07 percent, to 1,969.19.

Strong earnings had given a second wind to a stock market rally that wilted in June after pushing the S&P 500 up about 40 percent from its 12-year closing lose in March.

But lowered expectations have shifted the focus to earnings, which have in some cases failed to impress.

Office Depot , the No. 2 U.S. office supply retailer, reported a bigger-than-expected quarterly loss as the recession hurt demand from corporate customers. The stock slid 17.6 percent to $4.41.

U.S. Steel Corp shares fell 1.7 percent to $40.58 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 growth in three years.

(Editing by Jan Paschal)