Package org.ethelred.util.edhl
@NullMarked
package org.ethelred.util.edhl
Edward's Dumb HTML Library
A simple way to generate some HTML from Java without needing an extra build step. My use case is in a JBang script.
It is designed to use a static import.
import static org.ethelred.util.edhl.Html.*;
Then write HTML structure
var myDoc =
html(
head(title("My Doc")),
body(
h1("Heading goes here"),
p(
text("Some text "),
strong("then some strong text"),
text(" then more text")
),
div("Text content").classes("some", "classes"),
div(
a("A link").attr("href", "http://www.example.com")
)
)
);
myDoc.writeTo(System.out);