nakai/html
Types
pub type Node(a) {
Doctype(content: String)
Html(attrs: List(Attr(a)), children: List(Node(a)))
Head(children: List(Node(a)))
Body(attrs: List(Attr(a)), children: List(Node(a)))
Comment(content: String)
Element(
tag: String,
attrs: List(Attr(a)),
children: List(Node(a)),
)
LeafElement(tag: String, attrs: List(Attr(a)))
Text(content: String)
UnsafeText(content: String)
Fragment(children: List(Node(a)))
Nothing
}
Constructors
-
Doctype(content: String)
Can be used anywhere in the document, and will set the doctype of the document being rendered. Usually not necessary, as documents have a default of
<!DOCTYPE html>
.Example
html.Doctype("html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"")
-
Html(attrs: List(Attr(a)), children: List(Node(a)))
Used for setting attributes on the root
<html>
element of the document. Children will be rendered in-place, equivalent to usinghtml.Fragment(children)
.Example
html.Html([attrs.lang("en-US")], [ ... ])
-
Head(children: List(Node(a)))
Used for placing content in the
<head>
of the document. Useful for elements like<meta>
,<title>
,<link>
, etc.Example
html.Fragment([ html.Head([ html.title("List of puppies") ]), html.div([], [ ... ]) ])
-
Body(attrs: List(Attr(a)), children: List(Node(a)))
Used for setting attributes on the
<body>
element of the document. Children will be rendered in-place, equivalent to usinghtml.Fragment(children)
.Example
html.Body([attrs.class("dark-mode")], [ ... ])
-
Comment(content: String)
An HTML comment, which will be included in the document.
Example
html.Comment("You've uncovered my secrets!") // <!-- You've uncovered my secrets! -->
-
Element( tag: String, attrs: List(Attr(a)), children: List(Node(a)), )
An HTML element. You shouldn’t need to reach for this very often, but it can be a handy escape hatch if there isn’t a shorthand function for the element type you need.
Example
// bad example, pls use `html.div` html.Element("div", [], [html.Text("hello, lucy!")])
-
LeafElement(tag: String, attrs: List(Attr(a)))
An HTML element, but that does not have any children, and should be self closing. Similarly to
Element
, you shouldn’t really need this, except as an escape hatch if there isn’t a shorthand function for the element type you need.Example
// bad example, pls use `html.link` html.LeafElement("link", [attrs.rel("stylesheet"), attrs.href(...)])
-
Text(content: String)
Some plain text to include in the document. The provided text will be escaped, to make it safe to include in the document.
Example
html.Text("hello, lucy!") // hello, lucy!
// Time to trust some unvalidated user input! :^) html.div_text([], "<script>alert('pwned');</script>") // <div><script>alert('pwned');</script></div>
-
UnsafeText(content: String)
The dangerous cousin of
Text
. This will render the provided text as-is, without any santization. Good for things like including some HTML you just generated from a Markdown file. Bad for things like$_GET['search']
.Example
html.Text("hello, lucy!") // hello, lucy!
// Time to trust some unvalidated user input! :^) html.div([], [html.UnsafeText("<script>alert('pwned');</script>")]) // <div><script>alert('pwned');</script></div> // Oh no, we just got got! D:
-
Fragment(children: List(Node(a)))
An “transparent” container that will render it’s children, but does not add anything itself to the document. If you’ve ever used
React.Fragment
or<>
and</>
in JSX/React, this is that.Example
html.ul([], [ // some puppies are hard-coded html.li_text([], "August"), // some are loaded from a server html.Fragment(puppies_fetched_from_api |> list.map(html.li_text([], _))) ]) // <ul> // <li>August</li> // <li>Dot</li> // <li>Mody</li> // <li>Spot</li> // <li>Toby</li> // </ul>
-
Nothing
Renders absolutely nothing. For when you may or may not have something to render, and need a way to say “I’ve got nothing.”
Example
html.div([], [ case my_cool_feature { Enabled -> super_cool_stuff() Disabled -> html.Nothing } ])
Functions
pub fn a_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.a(attrs, children: [html.Text(text)])
pub fn abbr(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <abbr>
element
pub fn abbr_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.abbr(attrs, children: [html.Text(text)])
pub fn address(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <address>
element
pub fn address_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.address(attrs, children: [html.Text(text)])
pub fn article(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <article>
element
pub fn article_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.article(attrs, children: [html.Text(text)])
pub fn aside(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <aside>
element
pub fn aside_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.aside(attrs, children: [html.Text(text)])
pub fn audio(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <audio>
element
pub fn audio_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.audio(attrs, children: [html.Text(text)])
pub fn b_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.b(attrs, children: [html.Text(text)])
pub fn bdi(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <bdi>
element
pub fn bdi_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.bdi(attrs, children: [html.Text(text)])
pub fn bdo(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <bdo>
element
pub fn bdo_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.bdo(attrs, children: [html.Text(text)])
pub fn blockquote(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <blockquote>
element
pub fn blockquote_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.blockquote(attrs, children: [html.Text(text)])
pub fn button(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <button>
element
pub fn button_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.button(attrs, children: [html.Text(text)])
pub fn canvas(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <canvas>
element
pub fn canvas_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.canvas(attrs, children: [html.Text(text)])
pub fn caption(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <caption>
element
pub fn caption_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.caption(attrs, children: [html.Text(text)])
pub fn cite(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <cite>
element
pub fn cite_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.cite(attrs, children: [html.Text(text)])
pub fn code(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <code>
element
pub fn code_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.code(attrs, children: [html.Text(text)])
pub fn col(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <col>
element
pub fn col_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.col(attrs, children: [html.Text(text)])
pub fn colgroup(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <colgroup>
element
pub fn colgroup_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.colgroup(attrs, children: [html.Text(text)])
pub fn data(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <data>
element
pub fn data_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.data(attrs, children: [html.Text(text)])
pub fn datalist(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <datalist>
element
pub fn datalist_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.datalist(attrs, children: [html.Text(text)])
pub fn dd_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.dd(attrs, children: [html.Text(text)])
pub fn del(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <del>
element
pub fn del_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.del(attrs, children: [html.Text(text)])
pub fn details(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <details>
element
pub fn details_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.details(attrs, children: [html.Text(text)])
pub fn dfn(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <dfn>
element
pub fn dfn_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.dfn(attrs, children: [html.Text(text)])
pub fn dialog(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <dialog>
element
pub fn dialog_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.dialog(attrs, children: [html.Text(text)])
pub fn div(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <div>
element
pub fn div_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.div(attrs, children: [html.Text(text)])
pub fn dl_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.dl(attrs, children: [html.Text(text)])
pub fn dt_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.dt(attrs, children: [html.Text(text)])
pub fn em_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.em(attrs, children: [html.Text(text)])
pub fn embed(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <embed>
element
pub fn embed_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.embed(attrs, children: [html.Text(text)])
pub fn fieldset(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <fieldset>
element
pub fn fieldset_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.fieldset(attrs, children: [html.Text(text)])
pub fn figcaption(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <figcaption>
element
pub fn figcaption_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.figcaption(attrs, children: [html.Text(text)])
pub fn figure(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <figure>
element
pub fn figure_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.figure(attrs, children: [html.Text(text)])
pub fn footer(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <footer>
element
pub fn footer_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.footer(attrs, children: [html.Text(text)])
pub fn form(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <form>
element
pub fn form_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.form(attrs, children: [html.Text(text)])
pub fn h1_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.h1(attrs, children: [html.Text(text)])
pub fn h2_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.h2(attrs, children: [html.Text(text)])
pub fn h3_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.h3(attrs, children: [html.Text(text)])
pub fn h4_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.h4(attrs, children: [html.Text(text)])
pub fn h5_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.h5(attrs, children: [html.Text(text)])
pub fn h6_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.h6(attrs, children: [html.Text(text)])
pub fn header(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <header>
element
pub fn header_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.header(attrs, children: [html.Text(text)])
pub fn i_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.i(attrs, children: [html.Text(text)])
pub fn iframe(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <iframe>
element
pub fn iframe_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.iframe(attrs, children: [html.Text(text)])
pub fn ins(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <ins>
element
pub fn ins_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.ins(attrs, children: [html.Text(text)])
pub fn kbd(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <kbd>
element
pub fn kbd_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.kbd(attrs, children: [html.Text(text)])
pub fn label(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <label>
element
pub fn label_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.label(attrs, children: [html.Text(text)])
pub fn legend(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <legend>
element
pub fn legend_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.legend(attrs, children: [html.Text(text)])
pub fn li_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.li(attrs, children: [html.Text(text)])
pub fn main(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <main>
element
pub fn main_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.main(attrs, children: [html.Text(text)])
pub fn map(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <map>
element
pub fn map_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.map(attrs, children: [html.Text(text)])
pub fn mark(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <mark>
element
pub fn mark_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.mark(attrs, children: [html.Text(text)])
pub fn math(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <math>
element
pub fn math_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.math(attrs, children: [html.Text(text)])
pub fn menu(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <menu>
element
pub fn menu_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.menu(attrs, children: [html.Text(text)])
pub fn menuitem(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <menuitem>
element
pub fn menuitem_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.menuitem(attrs, children: [html.Text(text)])
pub fn meter(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <meter>
element
pub fn meter_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.meter(attrs, children: [html.Text(text)])
pub fn nav(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <nav>
element
pub fn nav_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.nav(attrs, children: [html.Text(text)])
pub fn noscript(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <noscript>
element
pub fn noscript_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.noscript(attrs, children: [html.Text(text)])
pub fn object(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <object>
element
pub fn object_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.object(attrs, children: [html.Text(text)])
pub fn ol_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.ol(attrs, children: [html.Text(text)])
pub fn optgroup(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <optgroup>
element
pub fn optgroup_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.optgroup(attrs, children: [html.Text(text)])
pub fn option(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <option>
element
pub fn option_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.option(attrs, children: [html.Text(text)])
pub fn output(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <output>
element
pub fn output_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.output(attrs, children: [html.Text(text)])
pub fn p_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.p(attrs, children: [html.Text(text)])
pub fn param(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <param>
element
pub fn param_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.param(attrs, children: [html.Text(text)])
pub fn picture(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <picture>
element
pub fn picture_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.picture(attrs, children: [html.Text(text)])
pub fn pre(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <pre>
element
pub fn pre_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.pre(attrs, children: [html.Text(text)])
pub fn progress(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <progress>
element
pub fn progress_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.progress(attrs, children: [html.Text(text)])
pub fn q_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.q(attrs, children: [html.Text(text)])
pub fn rp_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.rp(attrs, children: [html.Text(text)])
pub fn rt_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.rt(attrs, children: [html.Text(text)])
pub fn ruby(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <ruby>
element
pub fn ruby_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.ruby(attrs, children: [html.Text(text)])
pub fn s_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.s(attrs, children: [html.Text(text)])
pub fn samp(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <samp>
element
pub fn samp_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.samp(attrs, children: [html.Text(text)])
pub fn section(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <section>
element
pub fn section_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.section(attrs, children: [html.Text(text)])
pub fn select(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <select>
element
pub fn select_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.select(attrs, children: [html.Text(text)])
pub fn small(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <small>
element
pub fn small_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.small(attrs, children: [html.Text(text)])
pub fn span(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <span>
element
pub fn span_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.span(attrs, children: [html.Text(text)])
pub fn strong(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <strong>
element
pub fn strong_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.strong(attrs, children: [html.Text(text)])
pub fn sub(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <sub>
element
pub fn sub_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.sub(attrs, children: [html.Text(text)])
pub fn summary(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <summary>
element
pub fn summary_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.summary(attrs, children: [html.Text(text)])
pub fn sup(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <sup>
element
pub fn sup_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.sup(attrs, children: [html.Text(text)])
pub fn svg(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <svg>
element
pub fn svg_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.svg(attrs, children: [html.Text(text)])
pub fn table(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <table>
element
pub fn table_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.table(attrs, children: [html.Text(text)])
pub fn tbody(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <tbody>
element
pub fn tbody_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.tbody(attrs, children: [html.Text(text)])
pub fn td_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.td(attrs, children: [html.Text(text)])
pub fn textarea(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <textarea>
element
pub fn textarea_text(attrs: List(Attr(a)), text: String) -> Node(
a,
)
Shorthand for html.textarea(attrs, children: [html.Text(text)])
pub fn tfoot(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <tfoot>
element
pub fn tfoot_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.tfoot(attrs, children: [html.Text(text)])
pub fn th_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.th(attrs, children: [html.Text(text)])
pub fn thead(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <thead>
element
pub fn thead_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.thead(attrs, children: [html.Text(text)])
pub fn time(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <time>
element
pub fn time_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.time(attrs, children: [html.Text(text)])
pub fn tr_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.tr(attrs, children: [html.Text(text)])
pub fn u_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.u(attrs, children: [html.Text(text)])
pub fn ul_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.ul(attrs, children: [html.Text(text)])
pub fn var(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <var>
element
pub fn var_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.var(attrs, children: [html.Text(text)])
pub fn video(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <video>
element
pub fn video_text(attrs: List(Attr(a)), text: String) -> Node(a)
Shorthand for html.video(attrs, children: [html.Text(text)])
pub fn wbr(attrs: List(Attr(a)), children: List(Node(a))) -> Node(
a,
)
The HTML <wbr>
element