Skip to content

Kirby 3.7.5


Builds an HTML tag

Html::tag(string $name, array|string $content = '', array $attr = null, string $indent = null, int $level = 0): string


Name Type Default Description
$name * string Tag name
$content array|string '' Scalar value or array with multiple lines of content; self-closing
tags are generated automatically based on the Html::isVoid() list
$attr array null An associative array with additional attributes for the tag
$indent string null Indentation string, defaults to two spaces or null for output on one line
$level int 0 Indentation level

Return type


Parent class