Capitals center Casey Wellman, right, scored his first goal of the season in Saturday’s win over the Montreal Canadiens. (Francois Lacasse/NHLI via Getty Images)

The Capitals laid a solid foundation to build off of when they broke their seven-game losing streak Saturday in Montreal.

After mustering only eight goals during a two-week winless drought, the Capitals’ offense exploded in a 5-0 drubbing of the slumping Canadiens, who have lost six of eight.

Just as important as the sheer number of goals was the way Washington scored them.

The Capitals (23-21-8, 54 points) abandoned their pursuit of the perfect play, often a side effect of an offensive slump, in favor of a straightforward, grind-’em-out approach. They showed a willingness to attack the net, and their first four goals came as a result of making goaltender Carey Price’s life difficult in the crease.

Washington, which has struggled to find depth scoring this season, received contributions throughout the lineup. Five different Capitals scored, three of whom scored their first goal of the year.

“That was one of the key things that we talked about,” said forward Jay Beagle, who notched his first goal of the year Saturday. “We’ve got to create more traffic. When things aren’t going your way and you’re not getting those lucky bounces, you have to try and make your own bounces. The only way really to do that is to crash the net.”

Defensively, the Capitals cleanly broke out of their own zone while also stifling the Canadiens, who had three shots on goal when defenseman John Carlson scored Washington’s fourth goal midway through the game.

“Our defense was real good at getting back, moving the puck out quick, putting it on the forwards’ tape so that we could go north,” forward Troy Brouwer said. “We looked crisp. … In turn, [that] creates offense.”

The key for the Capitals is to replicate that performance. Their first opportunity comes tonight against a Sabres team that has handed them two 2-1 shootout losses this season. Buffalo (14-29-7, 35 points) is the worst team in the NHL.

“The game of hockey is such a fine line,” coach Adam Oates said. “There’s so many little subplots every single night that of course we are very conscious of reminding them that it’s one game. … Here we go again.”