HTMLDocument creates a simple HTML document using chain methods. Tags are added in the order they are called.
HTMLDocument
Note: It still does not format reserved characters in HTML.
add_doctype()
<!DOCTYPE hmtl>
add_comment()
<!-- My comment -->
add_text()
doc.start_p().add_text("My paragraph.").close_tag()
add_tag()
<input type="text" value="apple">
add_*
start_tag()
<h2>
start_*
close_tag()
</h2>
var doct := HTMLDocument.new() doc.add_doctype().start_html({ lang = "en", }) \ .start_head() \ .add_meta({ charset = "UTF-8" }) \ .close_tag() \ .start_body() \ .start_p() \ .add_text("Hello world!") \ .close_tag() \ .close_tag() \ .close_tag()
newline()
<br>
backspace()
There was an error while loading. Please reload this page.