use html_types::semantic::{Body, Class, Document, Head, Html, Id, Script};
use html_types::{attributes::Value, text::Text, url::Url};
fn main() {
let title = Some(Text::create("Title"));
let styles = vec![];
let url = Url::absolute_unchecked("http://google.com".into());
let script = Script::External(url);
let scripts = vec![script];
let head = Head {
title,
styles,
scripts,
};
let content = vec![Text::create("Hello").into()];
let body = Body {
content,
scripts: vec![],
id: Some(Id::create("my-id").unwrap()),
class: vec![
Class::create("test").unwrap(),
Class::create("body").unwrap(),
],
};
let html = Html {
head,
body,
lang: Value::EN,
};
let doc = Document { html };
let string: String = doc.into();
println!("{}", string);
}