Module function reference

tag

A reference entry for tag

Module function · HTML

tag tag (string name[, string content[, map attributes]]) ⇒ string

Creates an HTML element with raw content.

Example

YASS
$html = HTML::tag("p", "Hello", ["class" => "lead"])

Input: name="p", content="Hello", attributes=["class" => "lead"]

Output: <p class="lead">Hello</p>