This demo shows how to render HTML content in canvas and export it as an image.
What you see in the DOM is exactly what gets drawn into the canvas, including complex text shaping, custom fonts, and advanced CSS layouts
HTML-in-Canvas isn't supported in this browser, so the HTML content can't be drawn into the canvas, or exported.
Resulting image: