(CNBC) — U.S. stocks closed higher on Monday as technology stocks recovered from a wobbly performance last week.

The Dow Jones industrial average rose about 140 points and hit intraday and closing records, surpassing a previous all-time high of 21,391.97, which was set last week.

The S&P 500 gained 0.8 percent to also reached record levels, with information technology rising 1.4 percent to lead advancers. The Nasdaq composite outperformed, rising 1.65 percent.

Note: Read our discussion guidelines before commenting.