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
}
Content copied to clipboard
See also
Functions
Link copied to clipboard
Link copied to clipboard
Adds an attribute to this tag.
Link copied to clipboard
Applies a single class name via the class
attribute to this tag.
Link copied to clipboard
Applies a sequence of class names via the class
attribute to this tag.
Link copied to clipboard
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.
Link copied to clipboard
Adds an attribute to this tag only if value is not null
.
Link copied to clipboard
Applies a CSS style via the style
attribute to this tag. The attribute is not added if the generated CSS string is empty.
Link copied to clipboard
Appends a sub-tag.
Link copied to clipboard
Sets whether this tag is void (without a closing tag).