A rich and moist chocolate cake recipe that is perfect for any occasion.
Preheat your oven to 325°F and grease two 9-inch round cake pans.
Greasing the pans ensures the cake doesn't stick, making it easier to remove.
In a large mixing bowl, combine the flour, salt, baking powder, baking soda, sugar, and cocoa powder.
Sifting the dry ingredients together helps to evenly distribute the leavening agents.
Add the milk, eggs, vanilla, butter, and coffee to the dry ingredients and mix until smooth.
Mixing until just combined prevents overworking the batter, which can make the cake dense.
Divide the batter evenly between the prepared pans and bake for 30-35 minutes.
Rotating the pans halfway through baking ensures even cooking.
Let the cakes cool in the pans for 10 minutes, then transfer to a cooling rack to cool completely.
Cooling the cakes completely prevents the frosting from melting.
For the frosting, beat the butter until creamy, then gradually add the powdered sugar, vanilla, and milk until smooth.
Adding the sugar gradually prevents it from puffing out of the bowl.
Frost the cooled cakes, layering them if desired, and serve.
Using an offset spatula makes spreading the frosting easier and more even.