Html::tel()
Generates an <a>
tag for a phone number
Parameters
Name | Type | Default | Description |
---|---|---|---|
$tel * | string |
– | The phone number |
$text | array |string |null |
null |
The optional text; if null , the phone number will be used as text |
$attr | array |
[ ] |
Additional attributes for the tag |
Return type
string
Parent class
Kirby\Cms\Html
inherited from Kirby\Toolkit\Html
Limitations
The Html::link()
method strips out any non-numeric characters in the provided phone number (except the plus sign for international phone numbers). This is done to ensure a safe and reliable behavior of the resulting link.
If you need to add parameters or formatting to the tel
URI (according to RFC 3966), please use the Html::link()
method that otherwise works the same: