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
Ahtml tag with any options. -
#a(**attrs, &)
Renders
Ahtml tag with any options. -
#article(attrs, &)
Renders
ARTICLEhtml tag with any options. -
#article(**attrs, &)
Renders
ARTICLEhtml tag with any options. -
#aside(attrs, &)
Renders
ASIDEhtml tag with any options. -
#aside(**attrs, &)
Renders
ASIDEhtml tag with any options. -
#b(attrs, &)
Renders
Bhtml tag with any options. -
#b(**attrs, &)
Renders
Bhtml tag with any options. -
#bdi(attrs, &)
Renders
BDIhtml tag with any options. -
#bdi(**attrs, &)
Renders
BDIhtml tag with any options. -
#body(attrs, &)
Renders
BODYhtml tag with any options. -
#body(**attrs, &)
Renders
BODYhtml tag with any options. -
#br
Renders
BRhtml tag. - #build(&)
-
#button(attrs, &)
Renders
BUTTONhtml tag with any options. -
#button(**attrs, &)
Renders
BUTTONhtml tag with any options. -
#details(attrs, &)
Renders
DETAILShtml tag with any options. -
#details(**attrs, &)
Renders
DETAILShtml tag with any options. -
#dialog(attrs, &)
Renders
DIALOGhtml tag with any options. -
#dialog(**attrs, &)
Renders
DIALOGhtml tag with any options. -
#div(attrs, &)
Renders
DIVhtml tag with any options. -
#div(**attrs, &)
Renders
DIVhtml tag with any options. -
#doctype
Renders
HTMLdoctype tag. -
#em(attrs, &)
Renders
EMhtml tag with any options. -
#em(**attrs, &)
Renders
EMhtml tag with any options. -
#fieldset(attrs, &)
Renders
FIELDSEThtml tag with any options. -
#fieldset(**attrs, &)
Renders
FIELDSEThtml tag with any options. -
#figcaption(attrs, &)
Renders
FIGCAPTIONhtml tag with any options. -
#figcaption(**attrs, &)
Renders
FIGCAPTIONhtml tag with any options. -
#figure(attrs, &)
Renders
FIGUREhtml tag with any options. -
#figure(**attrs, &)
Renders
FIGUREhtml tag with any options. -
#footer(attrs, &)
Renders
FOOTERhtml tag with any options. -
#footer(**attrs, &)
Renders
FOOTERhtml tag with any options. -
#form(attrs, &)
Renders
FORMhtml tag with any options. -
#form(**attrs, &)
Renders
FORMhtml tag with any options. -
#h1(attrs, &)
Renders
H1html tag with any options. -
#h1(**attrs, &)
Renders
H1html tag with any options. -
#h2(attrs, &)
Renders
H2html tag with any options. -
#h2(**attrs, &)
Renders
H2html tag with any options. -
#h3(attrs, &)
Renders
H3html tag with any options. -
#h3(**attrs, &)
Renders
H3html tag with any options. -
#head(attrs, &)
Renders
HEADhtml tag with any options. -
#head(**attrs, &)
Renders
HEADhtml tag with any options. -
#header(attrs, &)
Renders
HEADERhtml tag with any options. -
#header(**attrs, &)
Renders
HEADERhtml tag with any options. -
#hr
Renders
HRhtml tag. -
#html(html)
Renders the provided html string.
-
#html(attrs, &)
Renders
HTMLhtml tag with any options. -
#html(**attrs, &)
Renders
HTMLhtml tag with any options. -
#i(attrs, &)
Renders
Ihtml tag with any options. -
#i(**attrs, &)
Renders
Ihtml tag with any options. -
#img(attrs)
Renders
IMGhtml tag with any options. -
#img(**attrs)
Renders
IMGhtml tag with any options. -
#input(attrs)
Renders
INPUThtml tag with any options. -
#input(**attrs)
Renders
INPUThtml tag with any options. -
#label(attrs, &)
Renders
LABELhtml tag with any options. -
#label(**attrs, &)
Renders
LABELhtml tag with any options. -
#li(attrs, &)
Renders
LIhtml tag with any options. -
#li(**attrs, &)
Renders
LIhtml tag with any options. -
#link(attrs)
Renders
LINKhtml tag with any options. -
#link(**attrs)
Renders
LINKhtml tag with any options. -
#main(attrs, &)
Renders
MAINhtml tag with any options. -
#main(**attrs, &)
Renders
MAINhtml tag with any options. -
#mark(attrs, &)
Renders
MARKhtml tag with any options. -
#mark(**attrs, &)
Renders
MARKhtml tag with any options. -
#menuitem(attrs, &)
Renders
MENUITEMhtml tag with any options. -
#menuitem(**attrs, &)
Renders
MENUITEMhtml tag with any options. -
#meter(attrs, &)
Renders
METERhtml tag with any options. -
#meter(**attrs, &)
Renders
METERhtml tag with any options. -
#nav(attrs, &)
Renders
NAVhtml tag with any options. -
#nav(**attrs, &)
Renders
NAVhtml tag with any options. -
#ol(attrs, &)
Renders
OLhtml tag with any options. -
#ol(**attrs, &)
Renders
OLhtml tag with any options. -
#option(attrs, &)
Renders
OPTIONhtml tag with any options. -
#option(**attrs, &)
Renders
OPTIONhtml tag with any options. -
#p(attrs, &)
Renders
Phtml tag with any options. -
#p(**attrs, &)
Renders
Phtml tag with any options. -
#progress(attrs, &)
Renders
PROGRESShtml tag with any options. -
#progress(**attrs, &)
Renders
PROGRESShtml tag with any options. -
#rp(attrs, &)
Renders
RPhtml tag with any options. -
#rp(**attrs, &)
Renders
RPhtml tag with any options. -
#rt(attrs, &)
Renders
RThtml tag with any options. -
#rt(**attrs, &)
Renders
RThtml tag with any options. -
#ruby(attrs, &)
Renders
RUBYhtml tag with any options. -
#ruby(**attrs, &)
Renders
RUBYhtml tag with any options. -
#s(attrs, &)
Renders
Shtml tag with any options. -
#s(**attrs, &)
Renders
Shtml tag with any options. -
#script(attrs, &)
Renders
SCRIPThtml tag with any options. -
#script(**attrs, &)
Renders
SCRIPThtml tag with any options. -
#section(attrs, &)
Renders
SECTIONhtml tag with any options. -
#section(**attrs, &)
Renders
SECTIONhtml tag with any options. -
#select(attrs, &)
Renders
SELECThtml tag with any options. -
#select(**attrs, &)
Renders
SELECThtml tag with any options. -
#span(attrs, &)
Renders
SPANhtml tag with any options. -
#span(**attrs, &)
Renders
SPANhtml tag with any options. -
#strong(attrs, &)
Renders
STRONGhtml tag with any options. -
#strong(**attrs, &)
Renders
STRONGhtml tag with any options. -
#summary(attrs, &)
Renders
SUMMARYhtml tag with any options. -
#summary(**attrs, &)
Renders
SUMMARYhtml tag with any options. -
#table(attrs, &)
Renders
TABLEhtml tag with any options. -
#table(**attrs, &)
Renders
TABLEhtml tag with any options. -
#tag(name, attrs, &)
Renders the provided html tag with any options.
- #tag(name, **attrs, &)
-
#tbody(attrs, &)
Renders
TBODYhtml tag with any options. -
#tbody(**attrs, &)
Renders
TBODYhtml tag with any options. -
#td(attrs, &)
Renders
TDhtml tag with any options. -
#td(**attrs, &)
Renders
TDhtml tag with any options. -
#text(text)
Renders escaped text in html tag.
-
#textarea(attrs, &)
Renders
TEXTAREAhtml tag with any options. -
#textarea(**attrs, &)
Renders
TEXTAREAhtml tag with any options. -
#th(attrs, &)
Renders
THhtml tag with any options. -
#th(**attrs, &)
Renders
THhtml tag with any options. -
#thead(attrs, &)
Renders
THEADhtml tag with any options. -
#thead(**attrs, &)
Renders
THEADhtml tag with any options. -
#time(attrs, &)
Renders
TIMEhtml tag with any options. -
#time(**attrs, &)
Renders
TIMEhtml tag with any options. -
#title(attrs, &)
Renders
TITLEhtml tag with any options. -
#title(**attrs, &)
Renders
TITLEhtml tag with any options. -
#tr(attrs, &)
Renders
TRhtml tag with any options. -
#tr(**attrs, &)
Renders
TRhtml tag with any options. -
#u(attrs, &)
Renders
Uhtml tag with any options. -
#u(**attrs, &)
Renders
Uhtml tag with any options. -
#ul(attrs, &)
Renders
ULhtml tag with any options. -
#ul(**attrs, &)
Renders
ULhtml tag with any options. -
#wbr(attrs, &)
Renders
WBRhtml tag with any options. -
#wbr(**attrs, &)
Renders
WBRhtml 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 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>
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>
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>