A new generation of investors is getting the impression that owning individual stocks can be "fun and it can be rewarding," CNBC's Jim Cramer said Monday.

The prior demographic, particularly the millennial cohort, learned that buying individual stocks is "too risky," he said, due to the skyrocketing valuations of internet companies before the turn of the century. That's when people gravitated toward buy-and-hold index funds, he added.

The key is knowing what you own, Cramer said.

"This idea that investing can be fun is a throwback, not to the dotcom bubble in 1999, but to the '80s and '90s, where you had some incredible bull runs and no one thought it was just horrible and stupid to like stocks," the "Mad Money" host said. "And if that's the case, well guess what: the rally could last a lot longer than most people expect."

Citing the action that gave both the Dow Jones Industrial Average and 0.9% gains, and the Nasdaq Composite a 0.62% move, Cramer said the winners had one thing in common.

"They're fun. They're companies you know or can learn about," he said, "and you can happily buy them into weakness if you've done the homework and you believe in their prospects."

Millennials are now investing in many companies that they recognize — think Beyond Meat, Revolve, Chewy, and Pinterest — that have recently gone public. They are being drawn to no-commission trading, Cramer said.

Beyond Meat could "meet its match" in Tyson Foods this week when the meat giant jumps into the faux-meat space, "but so much of the stock has been sold short that I don't even know if it will matter," Cramer said.

Chewy is a subscription economy play on the humanization of pets, an arena that Cramer called "one of the great trends of our era."

"Ask the people who got in on that IPO, fabulous IPO. They're having fun," he said.

Iconic household brands are also back in style on the Wall Street fashion show, Cramer said, pointing to Procter & Gamble, Estee Lauder, PepsiCo, McDonald's, Disney, and Starbucks.

"I know most of these are classic slowdown stocks — when they all move up together, [some] are going to say a recession must be around the corner," Cramer said. "However, at the moment I think their strength has much more to do with the fact that they're well-run companies with huge buybacks, great balance sheets, good dividends and are working."

The FAANG group — Facebook, Apple, Amazon, Netflix, and Google-parent Alphabet — "feels like it's making a comeback," Cramer said.

A new class of cloud computing stocks are hot, Cramer said. The host has been studying up the so-called cloud kings of Workday, Adobe, Salesforce, Splunk, ServiceNow, and VMWare. He said other smaller names such as Okta, Zscaler, Zendesk, Coupa, and others helping businesses boost productivity also need some attention.

After the Salesforce and Tableau Software merger last week, some investors are betting that Alphabet may need to make a move, Cramer said.

"Write down those stocks I just mentioned. They are all possible targets," he said.

"We're told that fun is a classic sign of a top," he said. "That's absolutely true in the long run, but I don't think we're there yet. Not everything is moving. You still need to be selective with your stock picking. It's not like this is a euphoric moment — three weeks ago the averages were getting crushed."