Spread or pipe a smooth layer of black buttercream on top of each cupcake using the offset spatula. The surface should be as flat as possible.
Fill the piping bag with white buttercream. Pipe a small dot in the centre of each cupcake, then pipe concentric circles outward from the centre, spacing them about 0.8 cm (0.3 in) apart, stopping before the edge.
Immediately drag a toothpick from the centre dot outward to the outer ring in a straight line, dividing the circle like a clock face. Wipe the toothpick clean and repeat at equal intervals around the circle to create 6 to 8 web sections.
Scatter a pinch of black sanding sugar around the outer edge of each cupcake if using.
Press a plastic spider ring or candy spider into the centre of the web.
Refrigerate until 20 minutes before serving. The web pattern will stay crisp when chilled.