Image source: Wal-Mart

The retail industry had a rough time in the first half of 2016. While retail spending is increasing, the vast majority of sales growth is going to online retailers. Brick-and-mortar giants such as Wal-Mart (WMT 1.08%) and Target (TGT -0.25%) are fiercely competing for dwindling foot traffic and sales growth while working to grow their presence online.

But the big-box retailers are sitting on billions in cash flow and have been steady dividend payers for decades. Investors interested in getting exposure to the retail industry but would prefer a steady dividend grower versus a relatively fast-growing internet retailer may be better suited with one of these industry stalwarts. So which is a better buy: Wal-Mart Stores Inc. or Target?

Growing sales online and in stores

As more sales migrate online, both Wal-Mart and Target have stepped up their e-commerce efforts.

While Wal-Mart has grown to become the second largest online retailer in recent years, it's started struggling to grow its online sales as the competition intensifies. During the first quarter, Wal-Mart managed to eke out only a 7% increase in online sales. That has it losing market share, as overall e-commerce sales in the U.S. grew 15.2% in the first quarter.

Meanwhile, brick-and-mortar sales aren't doing too well, either. Comparable-store sales increased just 0.8% in the first quarter. Moreover, Wal-Mart announced at the beginning of the years that it was closing 269 stores, including 154 locations in the United States. That announcement marked the end of the small-footprint Wal-Mart Express experiment that management was positioning as a growth driver for the company.

Comparatively, Target is performing admirably. Online sales growth continues to outpace the industry, up 23% in the first quarter on the back of 38% growth in the year-ago period. Comparable-store sales increased 1.2%, still slim, and a significant drop from the 2.3% it posted a year ago, but it's better than Wal-Mart.

Importantly, Target is seeing growth in its signature categories -- style, baby, kids, and wellness. Target's efforts in those categories serve to differentiate it from other big boxes and carry higher gross margins than other products such as electronics or food. In fact, Target's gross margin of 30.9% in the first quarter is 50 basis points above its gross margin in the same period a year ago and well above Wal-Mart's 24.7% gross margin.

Dividend growers

Both Target and Wal-Mart are members of the Dividend Aristocrats, having increased their dividends for 45 and 43 years straight, respectively.Both companies have similar payout ratios of about 47% of expected earnings.

But Target's dividend is more attractive than Wal-Mart's, for two reasons. First, Target is yielding 3.3%, versus Wal-Mart's 2.7% dividend yield. Second, and perhaps more important, is that Target is growing its dividend at a much stronger pace. The company just announced a 7.1% increase to its dividend, and the dividend has doubled over the past four years. Wal-Mart, comparatively, increased its dividend only 2% this year, and it's increased the payout just 6.4% total since the beginning of 2013.

Valuation

Despite its struggles, Wal-Mart shares are up 20% year to date. Target stock has moved up and down but is now trading around the same price at which it started 2016. As a result, Target stock is trading at a lower valuation than Wal-Mart shares. With a forward PE of 14.1, Target shares are going for a discount compared to Wal-Mart shares, which trade for a forward PE of 17.3.

With analysts expecting significantly faster earnings growth from Target over the next five years (9.25% versus Wal-Mart's 1.41%), Target should be trading for a premium P/E ratio compared with Wal-Mart. Those estimates are backed by better execution when it comes to both online and in-store sales, producing gross-margin expansion with management's focus on its signature categories. In addition, Target has a better dividend yield, and it's likely to continue outpacing Wal-Mart's dividend growth, since it seems content to maintain a similar payout ratio to its competitor.

Overall, Target looks like a much better buy than Wal-Mart right now.