class Nokogiri::HTML5::Builder
Nokogiri::XML::Builder documentation.
The HTML5 builder inherits from the XML builder, so make sure to read the
puts builder.to_html
end
}
}
}
doc.text “Hello world”
doc.span.bold {
doc.body(:onload => ‘some_func();’) {
doc.html {
builder = Nokogiri::HTML5::Builder.new do |doc|
span tag with a class of “bold” that has content of “Hello world”.
Create an HTML5 document with a body that has an onload attribute, and a
== Synopsis:
algorithm](www.w3.org/TR/2008/WD-html5-20080610/serializing.html).
[HTML5 standard’s serialization
The construction behavior is identical to HTML4::Builder, but HTML5 documents implement the
Nokogiri::XML::Builder before reading this documentation.
Nokogiri::XML::Builder. In fact, you should go read the documentation for
Nokogiri HTML5 builder is used for building HTML documents. It is very similar to the
##
def to_html
##
def to_html @doc.to_html end