Let's see how to create HTML links to email addresses, skype accounts, phone and fax numbers that, once clicked, offer the user to open them with the appropriate application.
These links look like the following classic HTML links, made with the tag
<a href="#">Text</a>with the difference that the data transmitted in the attribute href are composed of a prefix (mailto, tel, callto or fax) followed by the contact ID (email address, skype ID, phone number or fax number) separated by a colon (" :").
HTML links to email addresses
Let's start with the most classic one, the email address. The prefix to use is "mailto:" followed by the email address.
But it is possible to go much further by using the following parameters in the URL:
- subject : Subject of the mail
- cc : Recipients in carbon copy
- bcc : Blind carbon copy recipients
- body : Body of the mail
Here is an example of their use:
HTML links to phone numbers
For links to a telephone number, the prefix to be used is "such:" followed by the telephone number expressed with its code. In France, the code to use is +33. For other countries, here is the list of international telephone codes. To add the code to a national telephone number (10 digits), simply replace the first zero ("0") with the appropriate international code. Links to phone numbers are very useful on smartphones.
HTML links to fax numbers
The prefix to be used is "fax:" As for links to telephone numbers, the fax number used must begin with the international code.
HTML links to Skype accounts
The prefix to use to make a link to a Skype Name is "callto:", which is used to launch Skype, the popular instant messaging and video calling software, on computers and mobile devices on which the application is installed.
HTML links to TeamSpeak 3 servers
It is also possible to create links for TeamSpeak 3 software with the information of the target server as parameters. By default, the link used must consist of the server address and port. But it is possible to pass many more parameters in this URL, as shown below.
As with links to email addresses, links to a TeamSpeak server may contain settings. These parameters are as follows:
- port: Number of the port to use to connect to the server
- nickname : Name to use and display
- password : Password
- channel : Name of the channel (conversation room)
- cid : Specify the channel with an ID
- channelpassword: Password of the channel
- token: Connection key
- addbookmark : Name to give for the server in the teamspeak client favorites
These additional parameters are used as follows.
Note that if you use the "cid" parameter in the server URL, then the "channel" parameter can be ignored.