HtmlTagBuilder
A builder of an HTML tag.
Example:
val builder = tagBuilder("html") {
tag("head") {
tag("meta")
.attribute("charset", "UTF-8")
.void(true)
}
tag("body") {
+node.children
}See also
Functions
Adds a data-accept-empty attribute to this tag as a flag that this element is to keep even if it has no content. By default, empty elements, such as paragraphs without text, are hidden to avoid unwanted empty spaces.
Adds an attribute to this tag.
Applies a single class name via the class attribute to this tag.
Applies a sequence of class names via the class attribute to this tag.
Adds a data-hidden attribute to this tag as a flag that this is a hidden element. A page that has either zero elements or only hidden elements is considered blank. This attribute is usually read by external stylesheets and scripts.
Adds an attribute to this tag only if value is not null.
Applies a CSS style via the style attribute to this tag. The attribute is not added if the generated CSS string is empty.
Appends a sub-tag.
Sets whether this tag is void (without a closing tag).