HTMLTag

HTML tag builder.

Constructors

this
this(DocumentOutput output)

Create a new instance of this tag for the specified document output.

this
this(Tag tag)

Pass any other tag as an instance of this tag.

Alias This

tag

Members

Functions

attr
HTMLTag attr(Ts args)

Add an attribute to this element. This function wraps Tag.attr.

attributed
HTMLTag attributed()
classes
HTMLTag classes(string[] values)

Add a class attribute to a HTML tag from an array of strings.

href
HTMLTag href(string value)
HTMLTag href(InterpolationHeader header, Ts value)

Set the "href" attribute for an <a> element.

id
HTMLTag id(string value)
HTMLTag id(InterpolationHeader header, Ts value)

Add an id attribute to the HTML tag.

Manifest constants

isVoidTag
enum isVoidTag;

True if the tag is one of HTML's void elements. Void elements do not have an end tag, and thus, cannot have child nodes.

Variables

tag
Tag tag;

XML tag wrapped by this struct; tag this struct corresponds to.

Parameters

name

Name of the tag, for example div.

Meta