The tag can be marked as self-closing so it does not generate content nor an end tag.
auto normal = buildHTML() ~ (html) { Tag(html, "a") ~ { }; }; auto selfClosing = buildHTML() ~ (html) { Tag(html, "a").makeSelfClosing() ~ { }; }; assert(normal == "<a></a>"); assert(selfClosing == "<a/>");
If true, this is a "self-closing" tag. No child nodes or text can be added.