struct HTML::Builder
- HTML::Builder
- Struct
- Value
- Object
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.crhtml/builder/version.cr
Constant Summary
-
VERSION =
"0.2.1"
Constructors
Class Method Summary
-
.build(&)
Creates a new HTML::Builder, yields with with `with ...
Instance Method Summary
-
#a(attrs, &)
Renders
A
html tag with any options. -
#a(**attrs, &)
Renders
A
html tag with any options. -
#article(attrs, &)
Renders
ARTICLE
html tag with any options. -
#article(**attrs, &)
Renders
ARTICLE
html tag with any options. -
#aside(attrs, &)
Renders
ASIDE
html tag with any options. -
#aside(**attrs, &)
Renders
ASIDE
html tag with any options. -
#b(attrs, &)
Renders
B
html tag with any options. -
#b(**attrs, &)
Renders
B
html tag with any options. -
#bdi(attrs, &)
Renders
BDI
html tag with any options. -
#bdi(**attrs, &)
Renders
BDI
html tag with any options. -
#body(attrs, &)
Renders
BODY
html tag with any options. -
#body(**attrs, &)
Renders
BODY
html tag with any options. -
#br
Renders
BR
html tag. - #build(&)
-
#button(attrs, &)
Renders
BUTTON
html tag with any options. -
#button(**attrs, &)
Renders
BUTTON
html tag with any options. -
#details(attrs, &)
Renders
DETAILS
html tag with any options. -
#details(**attrs, &)
Renders
DETAILS
html tag with any options. -
#dialog(attrs, &)
Renders
DIALOG
html tag with any options. -
#dialog(**attrs, &)
Renders
DIALOG
html tag with any options. -
#div(attrs, &)
Renders
DIV
html tag with any options. -
#div(**attrs, &)
Renders
DIV
html tag with any options. -
#doctype
Renders
HTML
doctype tag. -
#em(attrs, &)
Renders
EM
html tag with any options. -
#em(**attrs, &)
Renders
EM
html tag with any options. -
#fieldset(attrs, &)
Renders
FIELDSET
html tag with any options. -
#fieldset(**attrs, &)
Renders
FIELDSET
html tag with any options. -
#figcaption(attrs, &)
Renders
FIGCAPTION
html tag with any options. -
#figcaption(**attrs, &)
Renders
FIGCAPTION
html tag with any options. -
#figure(attrs, &)
Renders
FIGURE
html tag with any options. -
#figure(**attrs, &)
Renders
FIGURE
html tag with any options. -
#footer(attrs, &)
Renders
FOOTER
html tag with any options. -
#footer(**attrs, &)
Renders
FOOTER
html tag with any options. -
#form(attrs, &)
Renders
FORM
html tag with any options. -
#form(**attrs, &)
Renders
FORM
html tag with any options. -
#h1(attrs, &)
Renders
H1
html tag with any options. -
#h1(**attrs, &)
Renders
H1
html tag with any options. -
#h2(attrs, &)
Renders
H2
html tag with any options. -
#h2(**attrs, &)
Renders
H2
html tag with any options. -
#h3(attrs, &)
Renders
H3
html tag with any options. -
#h3(**attrs, &)
Renders
H3
html tag with any options. -
#head(attrs, &)
Renders
HEAD
html tag with any options. -
#head(**attrs, &)
Renders
HEAD
html tag with any options. -
#header(attrs, &)
Renders
HEADER
html tag with any options. -
#header(**attrs, &)
Renders
HEADER
html tag with any options. -
#hr
Renders
HR
html tag. -
#html(html)
Renders the provided html string.
-
#html(attrs, &)
Renders
HTML
html tag with any options. -
#html(**attrs, &)
Renders
HTML
html tag with any options. -
#i(attrs, &)
Renders
I
html tag with any options. -
#i(**attrs, &)
Renders
I
html tag with any options. -
#img(attrs)
Renders
IMG
html tag with any options. -
#img(**attrs)
Renders
IMG
html tag with any options. -
#input(attrs)
Renders
INPUT
html tag with any options. -
#input(**attrs)
Renders
INPUT
html tag with any options. -
#label(attrs, &)
Renders
LABEL
html tag with any options. -
#label(**attrs, &)
Renders
LABEL
html tag with any options. -
#li(attrs, &)
Renders
LI
html tag with any options. -
#li(**attrs, &)
Renders
LI
html tag with any options. -
#link(attrs)
Renders
LINK
html tag with any options. -
#link(**attrs)
Renders
LINK
html tag with any options. -
#main(attrs, &)
Renders
MAIN
html tag with any options. -
#main(**attrs, &)
Renders
MAIN
html tag with any options. -
#mark(attrs, &)
Renders
MARK
html tag with any options. -
#mark(**attrs, &)
Renders
MARK
html tag with any options. -
#menuitem(attrs, &)
Renders
MENUITEM
html tag with any options. -
#menuitem(**attrs, &)
Renders
MENUITEM
html tag with any options. -
#meter(attrs, &)
Renders
METER
html tag with any options. -
#meter(**attrs, &)
Renders
METER
html tag with any options. -
#nav(attrs, &)
Renders
NAV
html tag with any options. -
#nav(**attrs, &)
Renders
NAV
html tag with any options. -
#ol(attrs, &)
Renders
OL
html tag with any options. -
#ol(**attrs, &)
Renders
OL
html tag with any options. -
#option(attrs, &)
Renders
OPTION
html tag with any options. -
#option(**attrs, &)
Renders
OPTION
html tag with any options. -
#p(attrs, &)
Renders
P
html tag with any options. -
#p(**attrs, &)
Renders
P
html tag with any options. -
#progress(attrs, &)
Renders
PROGRESS
html tag with any options. -
#progress(**attrs, &)
Renders
PROGRESS
html tag with any options. -
#rp(attrs, &)
Renders
RP
html tag with any options. -
#rp(**attrs, &)
Renders
RP
html tag with any options. -
#rt(attrs, &)
Renders
RT
html tag with any options. -
#rt(**attrs, &)
Renders
RT
html tag with any options. -
#ruby(attrs, &)
Renders
RUBY
html tag with any options. -
#ruby(**attrs, &)
Renders
RUBY
html tag with any options. -
#s(attrs, &)
Renders
S
html tag with any options. -
#s(**attrs, &)
Renders
S
html tag with any options. -
#script(attrs, &)
Renders
SCRIPT
html tag with any options. -
#script(**attrs, &)
Renders
SCRIPT
html tag with any options. -
#section(attrs, &)
Renders
SECTION
html tag with any options. -
#section(**attrs, &)
Renders
SECTION
html tag with any options. -
#select(attrs, &)
Renders
SELECT
html tag with any options. -
#select(**attrs, &)
Renders
SELECT
html tag with any options. -
#span(attrs, &)
Renders
SPAN
html tag with any options. -
#span(**attrs, &)
Renders
SPAN
html tag with any options. -
#strong(attrs, &)
Renders
STRONG
html tag with any options. -
#strong(**attrs, &)
Renders
STRONG
html tag with any options. -
#summary(attrs, &)
Renders
SUMMARY
html tag with any options. -
#summary(**attrs, &)
Renders
SUMMARY
html tag with any options. -
#table(attrs, &)
Renders
TABLE
html tag with any options. -
#table(**attrs, &)
Renders
TABLE
html tag with any options. -
#tag(name, attrs, &)
Renders the provided html tag with any options.
- #tag(name, **attrs, &)
-
#tbody(attrs, &)
Renders
TBODY
html tag with any options. -
#tbody(**attrs, &)
Renders
TBODY
html tag with any options. -
#td(attrs, &)
Renders
TD
html tag with any options. -
#td(**attrs, &)
Renders
TD
html tag with any options. -
#text(text)
Renders escaped text in html tag.
-
#textarea(attrs, &)
Renders
TEXTAREA
html tag with any options. -
#textarea(**attrs, &)
Renders
TEXTAREA
html tag with any options. -
#th(attrs, &)
Renders
TH
html tag with any options. -
#th(**attrs, &)
Renders
TH
html tag with any options. -
#thead(attrs, &)
Renders
THEAD
html tag with any options. -
#thead(**attrs, &)
Renders
THEAD
html tag with any options. -
#time(attrs, &)
Renders
TIME
html tag with any options. -
#time(**attrs, &)
Renders
TIME
html tag with any options. -
#title(attrs, &)
Renders
TITLE
html tag with any options. -
#title(**attrs, &)
Renders
TITLE
html tag with any options. -
#tr(attrs, &)
Renders
TR
html tag with any options. -
#tr(**attrs, &)
Renders
TR
html tag with any options. -
#u(attrs, &)
Renders
U
html tag with any options. -
#u(**attrs, &)
Renders
U
html tag with any options. -
#ul(attrs, &)
Renders
UL
html tag with any options. -
#ul(**attrs, &)
Renders
UL
html tag with any options. -
#wbr(attrs, &)
Renders
WBR
html tag with any options. -
#wbr(**attrs, &)
Renders
WBR
html tag with any options.
Constructor Detail
Class Method Detail
Creates a new HTML::Builder, yields with with with ... yield
and then returns the resulting string.
Instance Method Detail
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Renders the provided html string.
HTML::Builder.new.build { html "<p>crystal is awesome</p>" }
# => <>crystal is awesome</p>
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>
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>
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>
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>
Renders IMG
html tag with any options.
HTML::Builder.new.build do
img({:class => "crystal")
end
# => <img class="crystal">
Renders IMG
html tag with any options.
HTML::Builder.new.build do
img(class: "crystal")
end
# => <img class="crystal">
Renders INPUT
html tag with any options.
HTML::Builder.new.build do
input({:class => "crystal")
end
# => <input class="crystal">
Renders INPUT
html tag with any options.
HTML::Builder.new.build do
input(class: "crystal")
end
# => <input class="crystal">
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>
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>
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>
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>
Renders LINK
html tag with any options.
HTML::Builder.new.build do
link({:class => "crystal")
end
# => <link class="crystal">
Renders LINK
html tag with any options.
HTML::Builder.new.build do
link(class: "crystal")
end
# => <link class="crystal">
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Renders escaped text in html tag.
HTML::Builder.new.build { text "crystal is awesome" }
# => crystal is awesome
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>