Module function reference

attributes

A reference entry for attributes

Module function · HTML

attributes attributes (map values) ⇒ string

Creates escaped HTML attributes from a map.

Example

YASS
$html = HTML::attributes(["class" => "card", "id" => "main"])

Input: ["class" => "card", "id" => "main"]

Output: class="card" id="main"