Function html

Source
pub fn html(
    attributes: impl IntoIterator<Item = Attribute>,
    children: impl IntoIterator<Item = Element>,
) -> Document
Expand description

Create an HTML Document

You must pass the elt::head and elt::body element as you would with any other element.

ยงExample

let document = html([lang("en")], [
    head([], [title([], "Greetings")]),
    body([], [h1([], ["Hello world!".into()])]),
]);