1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
webpage := hb.Webpage().
SetTitle("My First Webpage with Golang UI").
Meta(
hb.Meta().
Attr("name", "viewport").
Attr("content", "width=device-width, initial-scale=1"),
).
Child(
hb.Div().
Class("container mx-auto p-4").
Child(
hb.Div().
Class("bg-white p-6 rounded-lg shadow").
Child(
hb.Div().
Class("col-md-12").
Child(hb.Heading1().Class("text-4xl font-bold text-blue-600").HTML("Hello World!")).
Child(hb.Paragraph().Class("text-gray-700").HTML("This is a webpage using Tailwind CSS.")),
),
),
)
webpage.Head().Child(hb.ScriptURL(cdn.TailwindCss_3_3_3()))
html := webpage.ToHTML() |