isVoidTag

A void element in HTML accepts no children, and has no closing tag. Contrast for example, the self-closing <input/> with the usual <div></div> — no </input> tag follows.

Correctly generating or omitting end tags is obligatory for HTML5.

pure @safe
bool
isVoidTag
(
string tag
)

Return Value

Type: bool

True, if the given tag name represents a HTML5 self-closing tag.

Meta