# HTML as texture in WEBGL

**URL:** <https://discourse.processing.org/t/html-as-texture-in-webgl/38600>\
**Category:** Project Guidance\
**Created:** [September 1, 2022, 1:01pm UTC](https://discourse.processing.org/t/html-as-texture-in-webgl/38600 "2022-09-01T13:01:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vkbr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/vkbr/32/16844_2.png) [@vkbr](https://discourse.processing.org/u/vkbr)\
**Post date:** [September 1, 2022, 1:01pm UTC](https://discourse.processing.org/t/html-as-texture-in-webgl/38600/1 "2022-09-01T13:01:00Z")

</div>

Hello.

Is it possible to use a `HTML` as texture in a 3D object?

Lets say I have a tweet card like this:

 ![Screen Shot 2022-09-01 at 10.03.25](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/d/e/de3091e9eb5158df58cb9c7dbd012ef3e985f730.jpeg)

That have been generated by a code like this (from tweet embed code, this is not the one for this particular tweet)

```auto
<blockquote
 class="twitter-tweet"><p lang="en" dir="ltr">Some new work 
<a 
href="https://twitter.com/ProcessingOrg?ref_src=twsrc%5Etfw">@ProcessingOrg</a>
 / <a 
href="https://twitter.com/processingjs?ref_src=twsrc%5Etfw">@processingjs</a>
 : &quot;Dead Presidents - Generative Portraits&quot;, a project
 on <a 
href="https://twitter.com/Behance?ref_src=twsrc%5Etfw">@Behance</a>
 :: <a 
href="http://t.co/Y9P9OmYcx3">http://t.co/Y9P9OmYcx3</a></p>&mdash;
 Mike Brondbjerg (@mikebrondbjerg) <a 
href="https://twitter.com/mikebrondbjerg/status/391558387520921600?ref_src=twsrc%5Etfw">October
 19, 2013</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" 
charset="utf-8"></script>

```

How could I use it as a texture in a 3D `box()`? Can be done?  
If not as HTML (with all links working) perhaps as an image?  
Can I “render” programmatically an HTML page from inside a p5js sketch as an image?  
`Pgraphics`?  
An `iFrame`?

Well as one can see, I’m not really sure where I’m going… Which is bad and good, as everything…  
Any thoughts or ideas are welcome.  
Thanks
