Function h2

Source
pub fn h2(children: Nodes) -> Node
Expand description

The h2 element.

Examples found in repository?
examples/hello-world.rs (line 13)
3fn main() {
4    let valid_html = document(
5        LanguageTag::parse("en-US").unwrap(),
6        head(vec![
7            link("text/css", "/static/css/main.css"),
8        ]),
9        body(vec![
10            h1(vec![text("Hello World!")]),
11            p(vec![text("This is the first paragraph created with lewp-html!")])
12                .attrs(vec![("class", "prelude"), ("id", "first-paragraph")]),
13            h2(vec![text("The elegant way to create HTML!")]),
14            p(vec![text("Creating HTML has never been easier. This paragraph is highlighted!")])
15                .attr("class", "highlighted"),
16        ]),
17    )
18    .into_html();
19    println!("{}", valid_html);
20}