In a saucepan, whisk together the sugar, cornstarch, salt, and cocoa powder.
Add the milk and the cream and whisk. Cook the mixture for 3 minutes over medium-high heat while whisking constantly.
Once the mixture has come to the boil, continue to cook for 2 minutes while whisking. The mixture will become really thick. Take it off the heat.
Put the chopped chocolate in a large bowl. Pour the hot pudding mixture over the chocolate.
Add the vanilla extract. Whisk constantly until the chocolate has melted.
Pour the pudding into 6 ramekins.
Cover the tops of the pudding with plastic wrap or wax paper. Put the plastic wrap directly on the pudding to avoid getting a skin. Chill in the fridge for at least 2 hours.
Serve with whipped cream, if desired.