elements

Types

pub type HtmlAttribute {
  HtmlAttribute(key: String, value: String)
}

Constructors

  • HtmlAttribute(key: String, value: String)
pub type HtmlElement {
  HtmlElement(
    tag: String,
    attrs: List(HtmlAttribute),
    children: List(HtmlElement),
  )
  Text(String)
}

Constructors

  • HtmlElement(
      tag: String,
      attrs: List(HtmlAttribute),
      children: List(HtmlElement),
    )
  • Text(String)

Functions

pub fn a(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn attr(key: String, value: String) -> HtmlAttribute
pub fn body(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn div(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn element(
  tag: String,
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn element_self_closing(
  tag: String,
  attrs: List(HtmlAttribute),
) -> HtmlElement
pub fn h1(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn h2(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn h3(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn h4(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn h5(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn head(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn html(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn meta(attrs: List(HtmlAttribute)) -> HtmlElement
pub fn p(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn span(
  attrs: List(HtmlAttribute),
  children: List(HtmlElement),
) -> HtmlElement
pub fn text(value: String) -> HtmlElement
pub fn title(title: String) -> HtmlElement
Search Document