Skip to content

Kirby 4.3.0


Generates an <a> tag; automatically supports mailto: and tel: links

Html::a(string $href, string|array|null $text = null, array $attr = [ ]): string


Name Type Default Description
$href * string The URL for the <a> tag
$text string|array|null null The optional text; if null, the URL will be used as text
$attr array [ ] Additional attributes for the tag

Return type


Parent class

Kirby\Cms\Html inherited from Kirby\Toolkit\Html