Use indentation in a bare-bones HTML document

Source

<!DOCTYPE html>

<html>
  <body>
    package main

    import "fmt"

    func main() {
        fmt.Println("Hello, golang!")
    }
  </body>
</html>

Result

package main import "fmt" func main() { fmt.Println("Hello, golang!") }

Discussion

Here we’ve written a simple golang program in the HTML document, demonstrating what happens when several different types of indentation are used. The result is the formatting has been removed. Other elements are needed to present the code the way I set it out in the source code, as well as CSS if highlighted code is a concern.