---
title: "Discussion on \"HTML-in-Canvas: what it is, how it works, and how to use it\" | Hashnode"
description: "Discussion on \"HTML-in-Canvas: what it is, how it works, and how to use it\". HTML-in-Canvas lets a canvas draw real HTML, and the text stays selectable, clickable and readable by screen readers. How it works, the code that runs in Chrome 157, which libraries broke, and where every browser stands."
url: "https://hashnode.com/posts/html-in-canvas/6aec82e4dce36c6085de1b0e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [HTML-in-Canvas: what it is, how it works, and how to use it](https://buildful.ai/blog/html-in-canvas?utm_source=hashnode&utm_medium=feed)

HTML-in-Canvas lets a canvas draw real HTML, and the text stays selectable, clickable and readable by screen readers. How it works, the code that runs in Chrome 157, which libraries broke, and where every browser stands.

6d ago · 20 min read · buildful.ai  
Read the article

-   [#html](https://hashnode.com/tag/html)
-   [#canvas](https://hashnode.com/tag/canvas)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#chrome](https://hashnode.com/tag/chrome)
-   [#webgl](https://hashnode.com/tag/webgl)

## Written by

[Syed Fazle Rahman](https://hashnode.com/@fazlerocks)

@fazlerocks · San Francisco, USA

  
[View profile](https://hashnode.com/@fazlerocks)

Co-founder, Hashnode and currently building Buildful and Bug0.

Co-founder and CEO at Hashnode

## Responses 1

Markdown supported · ⌘↵ to post

[Steven Mock](https://hashnode.com/@stevenmock)

[4d ago](https://hashnode.com/posts/html-in-canvas/6aec82e4dce36c6085de1b0e/comment/6aeeaf4051134f1647c7cc53)

The part that stood out to me is that this is not a replacement for HTML — it is a way to keep the good parts of HTML inside the places where canvas already makes sense. Keeping real DOM elements, with proper fallbacks and tests, means you do not lose text selection, focus, or accessibility just because one piece of a page needs to be drawn rather than laid out normally.

For the kind of sites I work on, most pages should stay plain HTML. But for an interactive map, a 3D view, or a complex visual where a rich HTML label would otherwise be hard to draw, this looks like a genuinely useful middle ground — as long as it is used sparingly and the fallback is tested, not just assumed to work.
