HTML-in-Canvas API
What is HTML-in-Canvas API?
The HTML-in-Canvas API allows developers to render live, interactive, and accessible DOM subtrees directly into 2D, WebGL, and WebGPU canvas contexts. It bridges the gap between high-performance pixel-level graphics and the rich semantic capabilities of the web platform.
The HTML-in-Canvas API, officially released in Chrome 157, resolves the long-standing architectural dilemma between using the DOM for semantic UI and the <canvas> element for high-performance graphics. By enabling developers to draw live DOM elements directly into canvas contexts, the API ensures that content remains fully interactive, accessible to screen readers, and compatible with browser features like Find-in-Page, autofill, and translation.
This integration eliminates the need for complex workarounds like floating HTML overlays or manual pixel-based text rendering, which often suffer from synchronization lag and accessibility issues. With native support for CSS styling, form controls, and DevTools inspection, the API simplifies the development of complex web applications, 3D scenes, and immersive games while maintaining high performance and reducing the need for heavy JavaScript layout engines.
HTML-in-Canvas API is built by Google (Chrome Team) and fits into the Frontend and API categories. It was released on Nov 9, 2026.
HTML-in-Canvas API is free to use and open source, with the source code on GitHub. Teams typically use it for component systems, API design, rendering and gateway and routing, with domain-specific use in E-commerce, Fintech, Media and Logistics.
Who HTML-in-Canvas API is for
Teams and individual developers working in Frontend and API.