On Monday's "Mad Money" show on CNBC, Jim Cramer said that while yesterday's rally was fueled by a resurgence of confidence in the government's economic plans, the foundation of any rally is the stocks that are powering it, such as the top 10 biggest-percentage gainers in the S&P 500.

For example, Exxon Mobil ( XOM) and Chevron, which he owns for his Action Alerts PLUS charitable account, confirmed the increase in the price of crude oil.

On Tuesday, Exxon closed down $1.15, or 1.6%, at $69.38. Chevron fell 21 cents, or 0.3%, to a $68.94 close.

He also saw signs of strength in financial stocks such as JPMorgan ( JPM) and Wells Fargo ( WFC), which both gained 24% on Monday, as well as Bank of America ( BAC).

JPMorgan closed down $2.39, or 8.3%, at $26.47 on Tuesday, while Wells Fargo was down 10.2% at $15.56, and BofA fell 6.9% to $7.26.

He singled out tech stocks Microsoft ( MSFT) and IBM ( IBM) and pointed to gains in Procter & Gamble ( PG), GE ( GE) and AT&T ( T) as additional signs that the rally could continue.

Microsoft and IBM closed down 2.6% at $17.86 and down 0.4% at $98.30, respectively, on Tuesday. Procter & Gamble closed down 1.4% at $47.06, GE was up a penny at $10.44, and AT&T was down 2.2% to close at $26.32.

As a dividend play, Cramer recommended Air Products ( APD). "Dividends have never been so important," he said. Air Products currently yields 3.3%, and Cramer says the company earns more than twice what it needs to cover the payout.

On Tuesday, Air Products traded up 54 cents, or 1%, to close at $56.44.

At the time of publication, Cramer was long GE, JPMorgan, Wells Fargo and Chevron.

Jim Cramer is a director and co-founder of TheStreet.com. He contributes daily market commentary for TheStreet.com's sites and serves as an adviser to the company's CEO. Outside contributing columnists for TheStreet.com and RealMoney.com, including Cramer, may, from time to time, write about stocks in which they have a position. In such cases, appropriate disclosure is made. To see his personal portfolio and find out what trades Cramer will make before he makes them, sign up for Action Alerts PLUS. Watch Cramer on "Mad Money" weeknights on CNBC. Click here to order Cramer's latest book, "Mad Money: Watch TV, Get Rich," click here to order his book, "Real Money: Sane Investing in an Insane World," click here to get his second book, "You Got Screwed!" and click here to order Cramer's autobiography, "Confessions of a Street Addict." While he cannot provide personalized investment advice or recommendations, he invites you to send comments on his column by clicking here.

TheStreet.com has a revenue-sharing relationship with Traders' Library under which it receives a portion of the revenue from Traders' Library purchases by customers directed there from TheStreet.com.

More from Jim Cramer

All 2018 Graduates Must Watch Jim Cramer's Bucknell Commencement Speech

All 2018 Graduates Must Watch Jim Cramer's Bucknell Commencement Speech

Jim Cramer: It's Okay to Fail, but It's Not Okay to Quit

Jim Cramer: It's Okay to Fail, but It's Not Okay to Quit

Video: Jim Cramer on Tariffs, the Market Rally, Caterpillar and Micron

Video: Jim Cramer on Tariffs, the Market Rally, Caterpillar and Micron

Jim Cramer Has 2 Tips for the Graduating Class of 2018

Jim Cramer Has 2 Tips for the Graduating Class of 2018

Video: Why the Stock Market Is Discounting China Trade Fears for Now

Video: Why the Stock Market Is Discounting China Trade Fears for Now