Navigate to the hello world example on the official online editor: http://elm-lang.org/examples/hello-HTML.
The code is as follows:
import HTML exposing (text)main = text "Hello, World!"
The preceding code compiles to a simple Hello, World! output. But what is this output? Is it an HTML element? No. It is actually just a DOM text node. And since text nodes need to have an element attached to them, this text node gets attached to the topmost element that actually gets rendered, which is the <body> element. You can verify this by inspecting the rendered text in your browser's Developer Tools.
Let's do something else here. Let's render an actual HTML element on the page. To do this, we need to pass in a ...