Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • HTML Tutorial
  • HTML Exercises
  • HTML Tags
  • HTML Attributes
  • Global Attributes
  • Event Attributes
  • HTML Interview Questions
  • HTML DOM
  • DOM Audio/Video
  • HTML 5
  • HTML Examples
  • Color Picker
  • A to Z Guide
  • HTML Formatter
Open In App
Next Article:
How to Create a Link to Send Email in HTML ?
Next article icon

How to Create Mail and Phone Link in HTML?

Last Updated : 23 Nov, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

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.
HTML
<a href= "mailto:[email protected][email protected]&[email protected]&subject=Mail to GeeksForGeeks&body=Demo email"        target="_blank"> 	Contact at GeeksForGeeks </a> 

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.
HTML
<a href="tel:+91123-456-7890">     Contact on call </a> <br />  <a href="callto:+91123-456-7890">     Contact on Skype </a> <br />  <a href="SMS:+91123-456-7890">     Send SMS </a><br />  <a href="fax:+91123-456-7890">     Send Fax </a> 

Output

phone_output

Next Article
How to Create a Link to Send Email in HTML ?
author
shubhamvora05
Improve
Article Tags :
  • Web Technologies
  • HTML
  • HTML-Attributes
  • HTML-Questions

Similar Reads

  • How to Create an Image Map in HTML ?
    An image map is a graphical representation that allows you to define clickable areas (or "hotspots") within an image. Each hotspot can be associated with a hyperlink, making different parts of the image interactive. Image maps are commonly used for navigation menus, interactive diagrams, and geograp
    2 min read
  • How to Create a Hyperlink in HTML?
    If we want to navigate from one page to another then Hyperlink comes into play. It provides you the link to navigate to another page, on hovering that link the cursor turns into a little hand. Hyperlink enables us to connect one page to another, navigate to specific sections, or even open applicatio
    2 min read
  • How to Create a Link to Send Email in HTML ?
    Incorporating email links into HTML pages facilitates a smooth way for users to send a message directly from the webpage. We will see how to create these email links, making your web pages user-friendly and interactive. Table of Content Using Mailto Protocol with Predefined SubjectCreating Link to s
    2 min read
  • How to Create Links to Other Pages in HTML ?
    HTML links are like pathways on the internet. They connect one webpage to another. Imagine a link as having two parts: a starting point (where you click) and an endpoint (where you end up). When you click on a link, you're basically starting at one point (the anchor) and moving to another (the desti
    2 min read
  • How to Create a Download Link in HTML?
    A download link allows users to download a specific file when they click on it. The download attribute in HTML is used to create a download link. Using the anchor tag we can create a download link in the HTML. Using the <a> Anchor TagTo create a download link in HTML, use the <a> tag wit
    1 min read
  • How to Change the Target of a Link in HTML ?
    In HTML, for changing the target of a link we can use the target attribute in the <a> anchor tag. This attribute mainly specifies where the linked content should be displayed. Below are the approaches that can be used to change the target link in HTML: Table of Content Using target Attribute O
    3 min read
  • How to Add a Subject to a Mailto link in HTML ?
    In HTML, to add a subject to a Mailto link, we can use the Subject as a query parameter just after the specified email address and pass the subject of the email as its value. Along with this, we can use JavaScript to add custom subjects according to the user input. Table of Content Directly adding t
    3 min read
  • How to connect Skype, Mail and Phone using HTML ?
    Connecting to Mail: Mailto link is a default way to sending a mail when the consumer wants to communicate or wants to give feedback, then by clicking the mailto link will open a default sending mail window. So we can use mailto which direct to the mail once the form is submitted. Using mailto we can
    3 min read
  • How to create a link with a media attribute in HTML5 ?
    The <link> media Attribute attribute specifies which media/device is being optimized for the target resource. This attribute is typically used in conjunction with CSS stylesheets to specify different styles for various media types and connecting to external stylesheets, allowing the user to se
    1 min read
  • How to Link a Button to Another Page in HTML?
    Linking a button to another page is a common requirement in web development. It can allow the users to navigate between a website's different sections or pages. This can be done using the various HTML elements. PrerequisitesHTMLCSS1. Using <a> Tag Styled as ButtonThe <a> tag is tradition
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences