In a saucepan, stir together the sugar, cocoa powder, cornstarch and salt.
Gradually whisk in the milk and place the pan on medium heat.
Bring the mixture up to a boil while stirring constantly. Boil for 1 minute, then remove from heat and add butter and vanilla.
Pour into individual serving dishes and refrigerate for at least two hours. Press a piece of plastic wrap onto the surface of the pudding to prevent skins from forming, if desired
For the microwave: stir together the sugar, cocoa powder, cornstarch and salt. Gradually whisk in milk. Microwave for 7-10 minutes until mixture comes to a boil, stirring every 2 minutes. Stir in butter and vanilla, then pour into serving dishes.