1use html_types::attributes::Value;
4use html_types::node::Element;
5use html_types::node::Node;
6use html_types::tag::Tag;
7use html_types::text::Text;
8
9fn main() {
10 let link = {
12 let label = Text::create("Click Me");
13 let url = Value::create("http://google.com").unwrap();
14 Element::anchor(url, label)
16 };
17 let body = Element::body(vec![link]);
19
20 let header = {
22 let mut el = Element::<Vec<Node>>::create(Tag::HEADER);
23 let text = Text::create("Hello world");
24 let title = Element::title(text);
25 el.push(title);
26 el
27 };
28 let html = Element::html(Value::EN, header, body);
29
30 let node: Node = html.into();
32
33 let string: String = node.into();
35
36 println!("{}", string);
37}