Skip to content

Kirby 6.0.0

Html::link()

Generates an a tag with an absolute Url

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

Parameters

Name Type Default Description
$href stringornull null Relative or absolute Url
$text arrayorstringornull null If null, the link will be used as link text. If an array is passed, each element will be added unencoded
$attr array [] Additional attributes for the a tag.

Return type

string

Parent class

Kirby\Cms\Html