
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to create a link to send email in HTML?
We use HTML <a> tag defines a hyperlink used to link web pages.
The href attribute of the <a> tag, which indicates the link's destination. Which provides us option to specify an email address. To create a link to send mail we use mailto:to specify email address inside href attribute in HTML.
Syntax
Following is the syntax to link a mail address to the web page.
<a href="mailto:xx@gmail.com">xx@gmail.com</a>
Same as the way we link a mobile number. We use mailto instead of tel inside a href attribute.
Example
Following is the example program to link a mail address to the web page.
<!DOCTYPE html> <html> <head><title>None</title></head> <body> <p><a href="mailto:lokesh@gmail.com">lokesh@gmail.com</a></p> </body> </html>
When we click on the email address it will navigate us to the default mail app in our system.
Example
Following is another example program to link a mail address to the web page.
<!DOCTYPE html> <html> <head> <title>HTML email link</title> </head> <body> <h2>Contact</h2> <p>For any queries: <a href="mailto:demo@example.com">Contact us</a></p> </body> </html>
Example
Following is one more example program to link a mail address to the web page.
<!DOCTYPE html> <html> <body> <h2>Creating a link to send email in HTML</h2> <ol> <li><a href="mailto:someone1@example.com">Mail 1</a></li> <li><a href="mailto:someone2@example.com">Mail 2</a></li> <li><a href="mailto:someone3@example.com">Mail 3</a></li> </ol> </body> </html>
- Related Articles
- How to create a link to send email with a subject in HTML?
- How to send HTML email using Android App?
- How to send a html based email using a JSP page?
- How to send HTML email using Android App using Kotlin?
- How to create a bookmark link in HTML?
- How to send email using PowerShell?
- How to create a download link with HTML?
- How do we send an email using HTML forms?
- How to create HTML link that doesnt follow the link?
- How to create a hyperlink to link another document in HTML?
- How to send an attachment in email using Swift?
- How to send an email with a file attachment in Android?
- How to send a report through email using Selenium Webdriver?
- How to send a email with attachment using a JSP page?
- How to send an attachment in email using Swift(ios)?
