VOOZH about

URL: https://www.geeksforgeeks.org/html/how-to-create-mail-and-phone-link-in-html/

⇱ How to Create Mail and Phone Link in HTML? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Create Mail and Phone Link in HTML?

Last Updated : 23 Jul, 2025

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.

Creating a Mailto 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> 

Where -

  • 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

👁 mail_output
OUtput

Creating a Phone Link

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>

Where -

  • tel: To redirect to a call app.
  • callto: To open skype app.
  • SMS: To send a Text message.
  • fax: To send a fax.

Output

👁 phone_output
Comment
Article Tags: