![]() |
VOOZH | about |
The HTML provides mailto and tel attributes to create the mail and phone links. We can use them in href to create the links. The href provides other sub-attributes that define the other properties of the mailto and phone link.
A mailto link is an easy way for users to contact website owners or anyone else directly from a webpage. When a user clicks on the mailto link, it opens their default email client with a new mail addressed to the specified email address. You can also prefill the subject and body text to save users time.
Syntax
<a href="mailto:EMAIL?cc=ANOTHER_EMAIL&bcc=ANOTHER_EMAIL&subject=SUBJECT&body=Demo email" target="_blank">Text_to_Show</a> mailto: Accepts the recipient's email address.cc:Optional parameter. Accepts another email address that will receive the carbon copy.bcc: Optional parameter. Accepts one or more email addresses that will receive the blind carbon copy.subject: Allows you to assign a default subject to the mail.body:Allows you to assign a default subject to the mail.?: First parameter delimiter.&:Allows you to separate more than one query.Output
Similar to mailto links, you can also create call links using the HTML anchor tag. When a user clicks on the call link, it redirects them to their default call app with the phone number pre-filled, so they can make calls directly.
Syntax
<a href="tel:+91123-456-7890"> call US </a>Output