Render HTML in the browser using the Html module in Elm

Share this video with your friends

Send Tweet

Elm provides a declarative way to produce DOM elements and react to DOM events, similar to HTML. Learn how to get Web content on the screen by writing functions that take in data and return Elm’s version of HTML.

Florian
Florian
~ 4 years ago

Note that the style example has changed in recent version of Elm (0.19.1 here) and now looks like this:

    div
        [ style "font-family" "-apple-system"
        , style "padding" "1em"
        ]

See https://package.elm-lang.org/packages/elm/html/latest/Html-Attributes#style