Shares of technology companies bucked the trend of the broader market to rise.

Tech shares have led the recent recovery as all three major U.S. stock indexes have surged more than 40% from their March lows. The tech-heavy Nasdaq Composite gained again Tuesday after notching on Monday its first record close since the coronavirus pandemic sent stocks tumbling.

Lockdown measures have forced wide swaths of the population to work from home, accelerating the adoption of networking, communications and online shopping services. Those changes in consumer behavior have helped push tech shares higher.

Online automobile seller Vroom Inc.'s shares soared in its first day of trading, adding its name to a list of companies that had strong public showings in the past few weeks.


 Write to Amy Pessetto at amy.pessetto@dowjones.com