01 - Preheat the oven to 350°F. Line a muffin pan with 12 cupcake liners.
02 - Whisk together flour, cocoa powder, baking powder, and salt in a bowl until thoroughly combined.
03 - In a separate large bowl, beat the softened butter and granulated sugar with an electric mixer until the mixture is light and fluffy.
04 - Beat in the eggs one at a time, then add vanilla extract and mix until incorporated.
05 - Alternately add the dry ingredient mixture and milk to the butter mixture, beginning and ending with the dry ingredients. Mix gently until just combined; do not overmix.
06 - Fill cupcake liners about two-thirds full with batter. Bake in the preheated oven for 16 to 18 minutes, or until a toothpick inserted in the center comes out clean.
07 - Remove cupcakes from the oven and let them cool completely on a wire rack before decorating.
08 - Beat softened butter until creamy. Sift in powdered sugar and cocoa powder. Add milk, vanilla extract, and a pinch of salt. Continue beating until the frosting is smooth and fluffy.
09 - Generously spread or pipe the chocolate frosting atop each cooled cupcake.
10 - Microwave mini marshmallows in a microwave-safe bowl for 15 to 20 seconds until fully melted and sticky. Stir well.
11 - Let marshmallow cool briefly until stretchy but not hot. Pinch off small pieces, stretch between your fingers, and drape over the frosted cupcakes to create a web pattern. Repeat until each cupcake has a spider web effect.
12 - Add candy spiders or edible glitter for additional Halloween flair as desired.