U.S. stocks reversed course and were higher at midday on Tuesday, with technology shares leading the way.

The Dow Jones industrial average was up 40.72 points, or 0.34 percent, at 12,119.70. The Standard & Poor's 500 Index put on 5.21 points, or 0.42 percent, at 1,256.99. The Nasdaq Composite Index gained 20.42 points, or 0.77 percent, at 2,677.64.

(Reporting by Caroline Valetkevitch; editing by Jeffrey Benkoe)