Template:HTML attribute/doc

From Wikisource
Jump to navigation Jump to search

Usage[edit]

Utility template for constructing optional HTML attributes. This is probably only useful in other templates.

It creates a string of HTML attributes, omitting any not given (or blank) and omitting the entire string if none are given.

Example

{{HTML attribute}}


Example

{{HTML attribute|class=}}


Example

{{HTML attribute|style=font-weight:bold;|class=example demo|id=test}}

id="test" class="example demo" style="font-weight:bold;"

See also[edit]