struct HTML::Builder

Overview

Defines a DSL for creating HTML.

Usage:

require "html_builder"

html = HTML.build do
  a(href: "http://crystal-lang.org") do
    text "crystal is awesome"
  end
end

puts html # => %(<a href="http://crystal-lang.org">crystal is awesome</a>)

Defined in:

html/builder/builder.cr
html/builder/version.cr

Constant Summary

VERSION = "0.2.1"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.build(&) #

Creates a new HTML::Builder, yields with with with ... yield and then returns the resulting string.


[View source]

Instance Method Detail

def a(attrs, &) #

Renders A html tag with any options.

HTML::Builder.new.build do
  a({:class => "crystal" }) { text "crystal is awesome" }
end
# => <a class="crystal">crystal is awesome</a>

[View source]
def a(**attrs, &) #

Renders A html tag with any options.

HTML::Builder.new.build do
  a(class: "crystal") { text "crystal is awesome" }
end
# => <a class="crystal">crystal is awesome</a>

[View source]
def article(attrs, &) #

Renders ARTICLE html tag with any options.

HTML::Builder.new.build do
  article({:class => "crystal" }) { text "crystal is awesome" }
end
# => <article class="crystal">crystal is awesome</article>

[View source]
def article(**attrs, &) #

Renders ARTICLE html tag with any options.

HTML::Builder.new.build do
  article(class: "crystal") { text "crystal is awesome" }
end
# => <article class="crystal">crystal is awesome</article>

[View source]
def aside(attrs, &) #

Renders ASIDE html tag with any options.

HTML::Builder.new.build do
  aside({:class => "crystal" }) { text "crystal is awesome" }
end
# => <aside class="crystal">crystal is awesome</aside>

[View source]
def aside(**attrs, &) #

Renders ASIDE html tag with any options.

HTML::Builder.new.build do
  aside(class: "crystal") { text "crystal is awesome" }
end
# => <aside class="crystal">crystal is awesome</aside>

[View source]
def b(attrs, &) #

Renders B html tag with any options.

HTML::Builder.new.build do
  b({:class => "crystal" }) { text "crystal is awesome" }
end
# => <b class="crystal">crystal is awesome</b>

[View source]
def b(**attrs, &) #

Renders B html tag with any options.

HTML::Builder.new.build do
  b(class: "crystal") { text "crystal is awesome" }
end
# => <b class="crystal">crystal is awesome</b>

[View source]
def bdi(attrs, &) #

Renders BDI html tag with any options.

HTML::Builder.new.build do
  bdi({:class => "crystal" }) { text "crystal is awesome" }
end
# => <bdi class="crystal">crystal is awesome</bdi>

[View source]
def bdi(**attrs, &) #

Renders BDI html tag with any options.

HTML::Builder.new.build do
  bdi(class: "crystal") { text "crystal is awesome" }
end
# => <bdi class="crystal">crystal is awesome</bdi>

[View source]
def body(attrs, &) #

Renders BODY html tag with any options.

HTML::Builder.new.build do
  body({:class => "crystal" }) { text "crystal is awesome" }
end
# => <body class="crystal">crystal is awesome</body>

[View source]
def body(**attrs, &) #

Renders BODY html tag with any options.

HTML::Builder.new.build do
  body(class: "crystal") { text "crystal is awesome" }
end
# => <body class="crystal">crystal is awesome</body>

[View source]
def br #

Renders BR html tag.

HTML::Builder.new.build { br } # => <br/>

[View source]
def build(&) #

[View source]
def button(attrs, &) #

Renders BUTTON html tag with any options.

HTML::Builder.new.build do
  button({:class => "crystal" }) { text "crystal is awesome" }
end
# => <button class="crystal">crystal is awesome</button>

[View source]
def button(**attrs, &) #

Renders BUTTON html tag with any options.

HTML::Builder.new.build do
  button(class: "crystal") { text "crystal is awesome" }
end
# => <button class="crystal">crystal is awesome</button>

[View source]
def details(attrs, &) #

Renders DETAILS html tag with any options.

HTML::Builder.new.build do
  details({:class => "crystal" }) { text "crystal is awesome" }
end
# => <details class="crystal">crystal is awesome</details>

[View source]
def details(**attrs, &) #

Renders DETAILS html tag with any options.

HTML::Builder.new.build do
  details(class: "crystal") { text "crystal is awesome" }
end
# => <details class="crystal">crystal is awesome</details>

[View source]
def dialog(attrs, &) #

Renders DIALOG html tag with any options.

HTML::Builder.new.build do
  dialog({:class => "crystal" }) { text "crystal is awesome" }
end
# => <dialog class="crystal">crystal is awesome</dialog>

[View source]
def dialog(**attrs, &) #

Renders DIALOG html tag with any options.

HTML::Builder.new.build do
  dialog(class: "crystal") { text "crystal is awesome" }
end
# => <dialog class="crystal">crystal is awesome</dialog>

[View source]
def div(attrs, &) #

Renders DIV html tag with any options.

HTML::Builder.new.build do
  div({:class => "crystal" }) { text "crystal is awesome" }
end
# => <div class="crystal">crystal is awesome</div>

[View source]
def div(**attrs, &) #

Renders DIV html tag with any options.

HTML::Builder.new.build do
  div(class: "crystal") { text "crystal is awesome" }
end
# => <div class="crystal">crystal is awesome</div>

[View source]
def doctype #

Renders HTML doctype tag.

HTML::Builder.new.build { doctype } # => <doctype/>

[View source]
def em(attrs, &) #

Renders EM html tag with any options.

HTML::Builder.new.build do
  em({:class => "crystal" }) { text "crystal is awesome" }
end
# => <em class="crystal">crystal is awesome</em>

[View source]
def em(**attrs, &) #

Renders EM html tag with any options.

HTML::Builder.new.build do
  em(class: "crystal") { text "crystal is awesome" }
end
# => <em class="crystal">crystal is awesome</em>

[View source]
def fieldset(attrs, &) #

Renders FIELDSET html tag with any options.

HTML::Builder.new.build do
  fieldset({:class => "crystal" }) { text "crystal is awesome" }
end
# => <fieldset class="crystal">crystal is awesome</fieldset>

[View source]
def fieldset(**attrs, &) #

Renders FIELDSET html tag with any options.

HTML::Builder.new.build do
  fieldset(class: "crystal") { text "crystal is awesome" }
end
# => <fieldset class="crystal">crystal is awesome</fieldset>

[View source]
def figcaption(attrs, &) #

Renders FIGCAPTION html tag with any options.

HTML::Builder.new.build do
  figcaption({:class => "crystal" }) { text "crystal is awesome" }
end
# => <figcaption class="crystal">crystal is awesome</figcaption>

[View source]
def figcaption(**attrs, &) #

Renders FIGCAPTION html tag with any options.

HTML::Builder.new.build do
  figcaption(class: "crystal") { text "crystal is awesome" }
end
# => <figcaption class="crystal">crystal is awesome</figcaption>

[View source]
def figure(attrs, &) #

Renders FIGURE html tag with any options.

HTML::Builder.new.build do
  figure({:class => "crystal" }) { text "crystal is awesome" }
end
# => <figure class="crystal">crystal is awesome</figure>

[View source]
def figure(**attrs, &) #

Renders FIGURE html tag with any options.

HTML::Builder.new.build do
  figure(class: "crystal") { text "crystal is awesome" }
end
# => <figure class="crystal">crystal is awesome</figure>

[View source]
def footer(attrs, &) #

Renders FOOTER html tag with any options.

HTML::Builder.new.build do
  footer({:class => "crystal" }) { text "crystal is awesome" }
end
# => <footer class="crystal">crystal is awesome</footer>

[View source]
def footer(**attrs, &) #

Renders FOOTER html tag with any options.

HTML::Builder.new.build do
  footer(class: "crystal") { text "crystal is awesome" }
end
# => <footer class="crystal">crystal is awesome</footer>

[View source]
def form(attrs, &) #

Renders FORM html tag with any options.

HTML::Builder.new.build do
  form({:class => "crystal" }) { text "crystal is awesome" }
end
# => <form class="crystal">crystal is awesome</form>

[View source]
def form(**attrs, &) #

Renders FORM html tag with any options.

HTML::Builder.new.build do
  form(class: "crystal") { text "crystal is awesome" }
end
# => <form class="crystal">crystal is awesome</form>

[View source]
def h1(attrs, &) #

Renders H1 html tag with any options.

HTML::Builder.new.build do
  h1({:class => "crystal" }) { text "crystal is awesome" }
end
# => <h1 class="crystal">crystal is awesome</h1>

[View source]
def h1(**attrs, &) #

Renders H1 html tag with any options.

HTML::Builder.new.build do
  h1(class: "crystal") { text "crystal is awesome" }
end
# => <h1 class="crystal">crystal is awesome</h1>

[View source]
def h2(attrs, &) #

Renders H2 html tag with any options.

HTML::Builder.new.build do
  h2({:class => "crystal" }) { text "crystal is awesome" }
end
# => <h2 class="crystal">crystal is awesome</h2>

[View source]
def h2(**attrs, &) #

Renders H2 html tag with any options.

HTML::Builder.new.build do
  h2(class: "crystal") { text "crystal is awesome" }
end
# => <h2 class="crystal">crystal is awesome</h2>

[View source]
def h3(attrs, &) #

Renders H3 html tag with any options.

HTML::Builder.new.build do
  h3({:class => "crystal" }) { text "crystal is awesome" }
end
# => <h3 class="crystal">crystal is awesome</h3>

[View source]
def h3(**attrs, &) #

Renders H3 html tag with any options.

HTML::Builder.new.build do
  h3(class: "crystal") { text "crystal is awesome" }
end
# => <h3 class="crystal">crystal is awesome</h3>

[View source]
def head(attrs, &) #

Renders HEAD html tag with any options.

HTML::Builder.new.build do
  head({:class => "crystal" }) { text "crystal is awesome" }
end
# => <head class="crystal">crystal is awesome</head>

[View source]
def head(**attrs, &) #

Renders HEAD html tag with any options.

HTML::Builder.new.build do
  head(class: "crystal") { text "crystal is awesome" }
end
# => <head class="crystal">crystal is awesome</head>

[View source]
def header(attrs, &) #

Renders HEADER html tag with any options.

HTML::Builder.new.build do
  header({:class => "crystal" }) { text "crystal is awesome" }
end
# => <header class="crystal">crystal is awesome</header>

[View source]
def header(**attrs, &) #

Renders HEADER html tag with any options.

HTML::Builder.new.build do
  header(class: "crystal") { text "crystal is awesome" }
end
# => <header class="crystal">crystal is awesome</header>

[View source]
def hr #

Renders HR html tag.

HTML::Builder.new.build { hr } # => <hr/>

[View source]
def html(html) #

Renders the provided html string.

HTML::Builder.new.build { html "<p>crystal is awesome</p>" }
# => <>crystal is awesome</p>

[View source]
def html(attrs, &) #

Renders HTML html tag with any options.

HTML::Builder.new.build do
  html({:class => "crystal" }) { text "crystal is awesome" }
end
# => <html class="crystal">crystal is awesome</html>

[View source]
def html(**attrs, &) #

Renders HTML html tag with any options.

HTML::Builder.new.build do
  html(class: "crystal") { text "crystal is awesome" }
end
# => <html class="crystal">crystal is awesome</html>

[View source]
def i(attrs, &) #

Renders I html tag with any options.

HTML::Builder.new.build do
  i({:class => "crystal" }) { text "crystal is awesome" }
end
# => <i class="crystal">crystal is awesome</i>

[View source]
def i(**attrs, &) #

Renders I html tag with any options.

HTML::Builder.new.build do
  i(class: "crystal") { text "crystal is awesome" }
end
# => <i class="crystal">crystal is awesome</i>

[View source]
def img(attrs) #

Renders IMG html tag with any options.

HTML::Builder.new.build do
  img({:class => "crystal")
end
# => <img class="crystal">

[View source]
def img(**attrs) #

Renders IMG html tag with any options.

HTML::Builder.new.build do
  img(class: "crystal")
end
# => <img class="crystal">

[View source]
def input(attrs) #

Renders INPUT html tag with any options.

HTML::Builder.new.build do
  input({:class => "crystal")
end
# => <input class="crystal">

[View source]
def input(**attrs) #

Renders INPUT html tag with any options.

HTML::Builder.new.build do
  input(class: "crystal")
end
# => <input class="crystal">

[View source]
def label(attrs, &) #

Renders LABEL html tag with any options.

HTML::Builder.new.build do
  label({:class => "crystal" }) { text "crystal is awesome" }
end
# => <label class="crystal">crystal is awesome</label>

[View source]
def label(**attrs, &) #

Renders LABEL html tag with any options.

HTML::Builder.new.build do
  label(class: "crystal") { text "crystal is awesome" }
end
# => <label class="crystal">crystal is awesome</label>

[View source]
def li(attrs, &) #

Renders LI html tag with any options.

HTML::Builder.new.build do
  li({:class => "crystal" }) { text "crystal is awesome" }
end
# => <li class="crystal">crystal is awesome</li>

[View source]
def li(**attrs, &) #

Renders LI html tag with any options.

HTML::Builder.new.build do
  li(class: "crystal") { text "crystal is awesome" }
end
# => <li class="crystal">crystal is awesome</li>

[View source]
def link(attrs) #

Renders LINK html tag with any options.

HTML::Builder.new.build do
  link({:class => "crystal")
end
# => <link class="crystal">

[View source]
def link(**attrs) #

Renders LINK html tag with any options.

HTML::Builder.new.build do
  link(class: "crystal")
end
# => <link class="crystal">

[View source]
def main(attrs, &) #

Renders MAIN html tag with any options.

HTML::Builder.new.build do
  main({:class => "crystal" }) { text "crystal is awesome" }
end
# => <main class="crystal">crystal is awesome</main>

[View source]
def main(**attrs, &) #

Renders MAIN html tag with any options.

HTML::Builder.new.build do
  main(class: "crystal") { text "crystal is awesome" }
end
# => <main class="crystal">crystal is awesome</main>

[View source]
def mark(attrs, &) #

Renders MARK html tag with any options.

HTML::Builder.new.build do
  mark({:class => "crystal" }) { text "crystal is awesome" }
end
# => <mark class="crystal">crystal is awesome</mark>

[View source]
def mark(**attrs, &) #

Renders MARK html tag with any options.

HTML::Builder.new.build do
  mark(class: "crystal") { text "crystal is awesome" }
end
# => <mark class="crystal">crystal is awesome</mark>

[View source]
def menuitem(attrs, &) #

Renders MENUITEM html tag with any options.

HTML::Builder.new.build do
  menuitem({:class => "crystal" }) { text "crystal is awesome" }
end
# => <menuitem class="crystal">crystal is awesome</menuitem>

[View source]
def menuitem(**attrs, &) #

Renders MENUITEM html tag with any options.

HTML::Builder.new.build do
  menuitem(class: "crystal") { text "crystal is awesome" }
end
# => <menuitem class="crystal">crystal is awesome</menuitem>

[View source]
def meter(attrs, &) #

Renders METER html tag with any options.

HTML::Builder.new.build do
  meter({:class => "crystal" }) { text "crystal is awesome" }
end
# => <meter class="crystal">crystal is awesome</meter>

[View source]
def meter(**attrs, &) #

Renders METER html tag with any options.

HTML::Builder.new.build do
  meter(class: "crystal") { text "crystal is awesome" }
end
# => <meter class="crystal">crystal is awesome</meter>

[View source]
def nav(attrs, &) #

Renders NAV html tag with any options.

HTML::Builder.new.build do
  nav({:class => "crystal" }) { text "crystal is awesome" }
end
# => <nav class="crystal">crystal is awesome</nav>

[View source]
def nav(**attrs, &) #

Renders NAV html tag with any options.

HTML::Builder.new.build do
  nav(class: "crystal") { text "crystal is awesome" }
end
# => <nav class="crystal">crystal is awesome</nav>

[View source]
def ol(attrs, &) #

Renders OL html tag with any options.

HTML::Builder.new.build do
  ol({:class => "crystal" }) { text "crystal is awesome" }
end
# => <ol class="crystal">crystal is awesome</ol>

[View source]
def ol(**attrs, &) #

Renders OL html tag with any options.

HTML::Builder.new.build do
  ol(class: "crystal") { text "crystal is awesome" }
end
# => <ol class="crystal">crystal is awesome</ol>

[View source]
def option(attrs, &) #

Renders OPTION html tag with any options.

HTML::Builder.new.build do
  option({:class => "crystal" }) { text "crystal is awesome" }
end
# => <option class="crystal">crystal is awesome</option>

[View source]
def option(**attrs, &) #

Renders OPTION html tag with any options.

HTML::Builder.new.build do
  option(class: "crystal") { text "crystal is awesome" }
end
# => <option class="crystal">crystal is awesome</option>

[View source]
def p(attrs, &) #

Renders P html tag with any options.

HTML::Builder.new.build do
  p({:class => "crystal" }) { text "crystal is awesome" }
end
# => <p class="crystal">crystal is awesome</p>

[View source]
def p(**attrs, &) #

Renders P html tag with any options.

HTML::Builder.new.build do
  p(class: "crystal") { text "crystal is awesome" }
end
# => <p class="crystal">crystal is awesome</p>

[View source]
def progress(attrs, &) #

Renders PROGRESS html tag with any options.

HTML::Builder.new.build do
  progress({:class => "crystal" }) { text "crystal is awesome" }
end
# => <progress class="crystal">crystal is awesome</progress>

[View source]
def progress(**attrs, &) #

Renders PROGRESS html tag with any options.

HTML::Builder.new.build do
  progress(class: "crystal") { text "crystal is awesome" }
end
# => <progress class="crystal">crystal is awesome</progress>

[View source]
def rp(attrs, &) #

Renders RP html tag with any options.

HTML::Builder.new.build do
  rp({:class => "crystal" }) { text "crystal is awesome" }
end
# => <rp class="crystal">crystal is awesome</rp>

[View source]
def rp(**attrs, &) #

Renders RP html tag with any options.

HTML::Builder.new.build do
  rp(class: "crystal") { text "crystal is awesome" }
end
# => <rp class="crystal">crystal is awesome</rp>

[View source]
def rt(attrs, &) #

Renders RT html tag with any options.

HTML::Builder.new.build do
  rt({:class => "crystal" }) { text "crystal is awesome" }
end
# => <rt class="crystal">crystal is awesome</rt>

[View source]
def rt(**attrs, &) #

Renders RT html tag with any options.

HTML::Builder.new.build do
  rt(class: "crystal") { text "crystal is awesome" }
end
# => <rt class="crystal">crystal is awesome</rt>

[View source]
def ruby(attrs, &) #

Renders RUBY html tag with any options.

HTML::Builder.new.build do
  ruby({:class => "crystal" }) { text "crystal is awesome" }
end
# => <ruby class="crystal">crystal is awesome</ruby>

[View source]
def ruby(**attrs, &) #

Renders RUBY html tag with any options.

HTML::Builder.new.build do
  ruby(class: "crystal") { text "crystal is awesome" }
end
# => <ruby class="crystal">crystal is awesome</ruby>

[View source]
def s(attrs, &) #

Renders S html tag with any options.

HTML::Builder.new.build do
  s({:class => "crystal" }) { text "crystal is awesome" }
end
# => <s class="crystal">crystal is awesome</s>

[View source]
def s(**attrs, &) #

Renders S html tag with any options.

HTML::Builder.new.build do
  s(class: "crystal") { text "crystal is awesome" }
end
# => <s class="crystal">crystal is awesome</s>

[View source]
def script(attrs, &) #

Renders SCRIPT html tag with any options.

HTML::Builder.new.build do
  script({:class => "crystal" }) { text "crystal is awesome" }
end
# => <script class="crystal">crystal is awesome</script>

[View source]
def script(**attrs, &) #

Renders SCRIPT html tag with any options.

HTML::Builder.new.build do
  script(class: "crystal") { text "crystal is awesome" }
end
# => <script class="crystal">crystal is awesome</script>

[View source]
def section(attrs, &) #

Renders SECTION html tag with any options.

HTML::Builder.new.build do
  section({:class => "crystal" }) { text "crystal is awesome" }
end
# => <section class="crystal">crystal is awesome</section>

[View source]
def section(**attrs, &) #

Renders SECTION html tag with any options.

HTML::Builder.new.build do
  section(class: "crystal") { text "crystal is awesome" }
end
# => <section class="crystal">crystal is awesome</section>

[View source]
def select(attrs, &) #

Renders SELECT html tag with any options.

HTML::Builder.new.build do
  select({:class => "crystal" }) { text "crystal is awesome" }
end
# => <select class="crystal">crystal is awesome</select>

[View source]
def select(**attrs, &) #

Renders SELECT html tag with any options.

HTML::Builder.new.build do
  select(class: "crystal") { text "crystal is awesome" }
end
# => <select class="crystal">crystal is awesome</select>

[View source]
def span(attrs, &) #

Renders SPAN html tag with any options.

HTML::Builder.new.build do
  span({:class => "crystal" }) { text "crystal is awesome" }
end
# => <span class="crystal">crystal is awesome</span>

[View source]
def span(**attrs, &) #

Renders SPAN html tag with any options.

HTML::Builder.new.build do
  span(class: "crystal") { text "crystal is awesome" }
end
# => <span class="crystal">crystal is awesome</span>

[View source]
def strong(attrs, &) #

Renders STRONG html tag with any options.

HTML::Builder.new.build do
  strong({:class => "crystal" }) { text "crystal is awesome" }
end
# => <strong class="crystal">crystal is awesome</strong>

[View source]
def strong(**attrs, &) #

Renders STRONG html tag with any options.

HTML::Builder.new.build do
  strong(class: "crystal") { text "crystal is awesome" }
end
# => <strong class="crystal">crystal is awesome</strong>

[View source]
def summary(attrs, &) #

Renders SUMMARY html tag with any options.

HTML::Builder.new.build do
  summary({:class => "crystal" }) { text "crystal is awesome" }
end
# => <summary class="crystal">crystal is awesome</summary>

[View source]
def summary(**attrs, &) #

Renders SUMMARY html tag with any options.

HTML::Builder.new.build do
  summary(class: "crystal") { text "crystal is awesome" }
end
# => <summary class="crystal">crystal is awesome</summary>

[View source]
def table(attrs, &) #

Renders TABLE html tag with any options.

HTML::Builder.new.build do
  table({:class => "crystal" }) { text "crystal is awesome" }
end
# => <table class="crystal">crystal is awesome</table>

[View source]
def table(**attrs, &) #

Renders TABLE html tag with any options.

HTML::Builder.new.build do
  table(class: "crystal") { text "crystal is awesome" }
end
# => <table class="crystal">crystal is awesome</table>

[View source]
def tag(name, attrs, &) #

Renders the provided html tag with any options.

HTML::Builder.new.build do
  tag("section", {class: "crystal"}) { text "crystal is awesome" }
end
# => <section class="crystal">crystal is awesome</section>

[View source]
def tag(name, **attrs, &) #

[View source]
def tbody(attrs, &) #

Renders TBODY html tag with any options.

HTML::Builder.new.build do
  tbody({:class => "crystal" }) { text "crystal is awesome" }
end
# => <tbody class="crystal">crystal is awesome</tbody>

[View source]
def tbody(**attrs, &) #

Renders TBODY html tag with any options.

HTML::Builder.new.build do
  tbody(class: "crystal") { text "crystal is awesome" }
end
# => <tbody class="crystal">crystal is awesome</tbody>

[View source]
def td(attrs, &) #

Renders TD html tag with any options.

HTML::Builder.new.build do
  td({:class => "crystal" }) { text "crystal is awesome" }
end
# => <td class="crystal">crystal is awesome</td>

[View source]
def td(**attrs, &) #

Renders TD html tag with any options.

HTML::Builder.new.build do
  td(class: "crystal") { text "crystal is awesome" }
end
# => <td class="crystal">crystal is awesome</td>

[View source]
def text(text) #

Renders escaped text in html tag.

HTML::Builder.new.build { text "crystal is awesome" }
# => crystal is awesome

[View source]
def textarea(attrs, &) #

Renders TEXTAREA html tag with any options.

HTML::Builder.new.build do
  textarea({:class => "crystal" }) { text "crystal is awesome" }
end
# => <textarea class="crystal">crystal is awesome</textarea>

[View source]
def textarea(**attrs, &) #

Renders TEXTAREA html tag with any options.

HTML::Builder.new.build do
  textarea(class: "crystal") { text "crystal is awesome" }
end
# => <textarea class="crystal">crystal is awesome</textarea>

[View source]
def th(attrs, &) #

Renders TH html tag with any options.

HTML::Builder.new.build do
  th({:class => "crystal" }) { text "crystal is awesome" }
end
# => <th class="crystal">crystal is awesome</th>

[View source]
def th(**attrs, &) #

Renders TH html tag with any options.

HTML::Builder.new.build do
  th(class: "crystal") { text "crystal is awesome" }
end
# => <th class="crystal">crystal is awesome</th>

[View source]
def thead(attrs, &) #

Renders THEAD html tag with any options.

HTML::Builder.new.build do
  thead({:class => "crystal" }) { text "crystal is awesome" }
end
# => <thead class="crystal">crystal is awesome</thead>

[View source]
def thead(**attrs, &) #

Renders THEAD html tag with any options.

HTML::Builder.new.build do
  thead(class: "crystal") { text "crystal is awesome" }
end
# => <thead class="crystal">crystal is awesome</thead>

[View source]
def time(attrs, &) #

Renders TIME html tag with any options.

HTML::Builder.new.build do
  time({:class => "crystal" }) { text "crystal is awesome" }
end
# => <time class="crystal">crystal is awesome</time>

[View source]
def time(**attrs, &) #

Renders TIME html tag with any options.

HTML::Builder.new.build do
  time(class: "crystal") { text "crystal is awesome" }
end
# => <time class="crystal">crystal is awesome</time>

[View source]
def title(attrs, &) #

Renders TITLE html tag with any options.

HTML::Builder.new.build do
  title({:class => "crystal" }) { text "crystal is awesome" }
end
# => <title class="crystal">crystal is awesome</title>

[View source]
def title(**attrs, &) #

Renders TITLE html tag with any options.

HTML::Builder.new.build do
  title(class: "crystal") { text "crystal is awesome" }
end
# => <title class="crystal">crystal is awesome</title>

[View source]
def tr(attrs, &) #

Renders TR html tag with any options.

HTML::Builder.new.build do
  tr({:class => "crystal" }) { text "crystal is awesome" }
end
# => <tr class="crystal">crystal is awesome</tr>

[View source]
def tr(**attrs, &) #

Renders TR html tag with any options.

HTML::Builder.new.build do
  tr(class: "crystal") { text "crystal is awesome" }
end
# => <tr class="crystal">crystal is awesome</tr>

[View source]
def u(attrs, &) #

Renders U html tag with any options.

HTML::Builder.new.build do
  u({:class => "crystal" }) { text "crystal is awesome" }
end
# => <u class="crystal">crystal is awesome</u>

[View source]
def u(**attrs, &) #

Renders U html tag with any options.

HTML::Builder.new.build do
  u(class: "crystal") { text "crystal is awesome" }
end
# => <u class="crystal">crystal is awesome</u>

[View source]
def ul(attrs, &) #

Renders UL html tag with any options.

HTML::Builder.new.build do
  ul({:class => "crystal" }) { text "crystal is awesome" }
end
# => <ul class="crystal">crystal is awesome</ul>

[View source]
def ul(**attrs, &) #

Renders UL html tag with any options.

HTML::Builder.new.build do
  ul(class: "crystal") { text "crystal is awesome" }
end
# => <ul class="crystal">crystal is awesome</ul>

[View source]
def wbr(attrs, &) #

Renders WBR html tag with any options.

HTML::Builder.new.build do
  wbr({:class => "crystal" }) { text "crystal is awesome" }
end
# => <wbr class="crystal">crystal is awesome</wbr>

[View source]
def wbr(**attrs, &) #

Renders WBR html tag with any options.

HTML::Builder.new.build do
  wbr(class: "crystal") { text "crystal is awesome" }
end
# => <wbr class="crystal">crystal is awesome</wbr>

[View source]