(CNBC) U.S. stocks rose on Thursday as technology stocks regained some of the ground they lost in the past week.

The Dow Jones industrial average gained 70.57 points to close at 24,211.48, after briefly rising more than 100 points. The S&P 500 advanced 0.3 percent to 2,636.98. Information technology was among the best-performing sectors in the S&P 500, advancing 0.6 percent.

Tech, which is the best-performing sector of the year, had been under pressure recently — falling 0.9 percent over the past week — but posted a three-day winning streak on Thursday.

Note: Read our discussion guidelines before commenting.