# Embed Elm-UI into HTML Page

**URL:** <https://discourse.elm-lang.org/t/embed-elm-ui-into-html-page/7576>\
**Category:** Learn\
**Created:** [July 23, 2021, 12:50pm UTC](https://discourse.elm-lang.org/t/embed-elm-ui-into-html-page/7576 "2021-07-23T12:50:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![joelq](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/joelq/32/445_2.png) [@joelq](https://discourse.elm-lang.org/u/joelq)\
**Post date:** [July 23, 2021, 3:19pm UTC](https://discourse.elm-lang.org/t/embed-elm-ui-into-html-page/7576/2 "2021-07-23T15:19:57Z")

</div>

Yes, you can convert your `Element msg` into an `Html msg` using the [Element.layout](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/Element#layout) function.

You can also convert the other way, embedding HTML inside an element via the [Element.html](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/Element#html) function. This means you can have HTML inside an element inside HTML inside an element …

You can see an example in this old gamejam project. I have an elm/html `button` inside an elm-ui `row` inside an elm/html `div`.

> <https://github.com/JoelQ/muses/blob/d26dc28c3cf3aa49d5a9e2bde518232a8d20aac2/src/Main.elm#L170-L188>

---

_[View the full topic](https://discourse.elm-lang.org/t/embed-elm-ui-into-html-page/7576)._
