Page 26 - HTML5
P. 26
If the value of the href-attribute begins with mailto: it will try to open an email client on click:
<a href="mailto:example@example.com">Send email</a>
This will put the email address example@example.com as the recipient for the newly created email.
Cc and Bcc
You can also add addresses for cc- or bcc-recipients using the following syntax:
<a href="mailto:example@example.com?cc=john@example.com&bcc=jane@example.com">Send email</a>
Subject and body text
You can populate the subject and body for the new email as well:
<a href="mailto:example@example.com?subject=Example+subject&body=Message+text">Send email</a>
Those values must be URL encoded.
Clicking on a link with mailto: will try to open the default email client specified by your operating
system or it will ask you to choose what client you want to use. Not all options specified after the
recipient's address are supported in all email clients.
Link that dials a number
If the value of the href-attribute begins with tel:, your device will dial the number when you click it.
This works on mobile devices or on computers/tablets running software – like Skype or FaceTime
– that can make phone calls.
<a href="tel:11234567890">Call us</a>
Most devices and programs will prompt the user in some way to confirm the number they are
about to dial.
Read Anchors and Hyperlinks online: https://riptutorial.com/html/topic/254/anchors-and-hyperlinks
https://riptutorial.com/ 10

