41 lines
617 B
Markdown
41 lines
617 B
Markdown
# HTML
|
|
|
|
Package html provides functions for programmatically composing and rendering HTML documents, fragments and templates.
|
|
|
|
Docs:
|
|
|
|
- https://godocs.io/code.squareroundforest.org/arpio/html
|
|
- [lib.go](lib.go)
|
|
|
|
Example:
|
|
|
|
```
|
|
package main
|
|
|
|
import (
|
|
"os"
|
|
"code.squareroundforest.org/arpio/html"
|
|
. "code.squareroundforest.org/arpio/html/tag"
|
|
)
|
|
|
|
func main() {
|
|
html.Write(
|
|
os.Stdout,
|
|
html.Indent(),
|
|
Doctype("html"),
|
|
Html(
|
|
Head(
|
|
Title("Hello, world!"),
|
|
Meta("charset", "utf-8"),
|
|
),
|
|
Body(
|
|
H1("Hello, world!"),
|
|
P("This is a sample HTML page."),
|
|
),
|
|
),
|
|
)
|
|
}
|
|
```
|
|
|
|
*Made in Berlin, DE*
|