html.xgo 385 B

123456789101112131415161718192021222324252627
  1. fmt := import("fmt")
  2. http := import("http")
  3. html := import("html").Renderer()
  4. added := html.ul()
  5. for i in [1, 2, 3, 4, 5] {
  6. added.add(html.li().body(i))
  7. }
  8. fmt.println(
  9. html.html({
  10. lang: "en"
  11. }).body(
  12. html.head().body(
  13. html.link({
  14. rel: "stylesheet",
  15. href: "/web/main.css"
  16. }).final()
  17. ),
  18. html.body().body(
  19. html.p().body(
  20. ">>>shit"
  21. )
  22. ),
  23. added
  24. )
  25. )