Mailto Link Generator | Create HTML for Email Links
Create the email HTML Code using a "mailto" hyperlink - the HTML email link code that opens someone's email software (like Microsoft Outlook for instance). I will show you how to write the code for this and at the bottom of the page there's a tool to generate the HTML email link.
It's a pretty nifty generator that lets you create the email HTML code for a mailto link with advanced options like having the subject and body text encoded into the email link if you like.
Should You Use Mailto Links?
Mailto links are not deprecated... but if a hundred random people were to encounter a mailto link on a website, it would not work as expected for the vast majority of them.
Clicking on the link would not open up their email client so it's probably best to make that your email address is the link text. This way people can manually copy the email if they want to contact you.
What Not To Include in the HTML Email Code
Make sure not to include a question mark, equal sign, an ampersand or double quotes in your subject line or body as that will break the code. If you do need to include them than they need to be written differently. You can either memorize the following code - ampersand is & - double quotes is " - equal sign is = and question mark is ? or you can use this little tool to generate the email link code in a safely encoded manner (though some email software may require you not to use even the encoded equivalents in the email link).
HTML Email Mailto Link
Here's a HTML email link code example. If you want the person to click the mailto hyperlink and their email client to open with your email in the TO part of the email then you need to implement something like the following code.
Please email me at <a href="mailto:[email protected]">[email protected]</a>
Working example of this code: Please email me at [email protected].
[You can click the link if you want to test the html code]
This pretty much the simplest implementation of an email's HTML link code. To make this work for you simply change the two occurrences of the email address to your own email address.
As a recommendation I would use your email as the link text instead of something like "contact me" or similar which usually suggests to the user that they're going to be sent to a contact form - more so than having their email client open up.
Email HTML Code with Subject
We'll take the previous example and modify it so that now it will have you email in the TO field and have a subject line in the SUBJECT field of the email. The new part has been bolded
Please email me at <a href="mailto:[email protected]?subject=I love TextFixer.com">[email protected]</a>
Working example of this code: Please email me at [email protected].
If you look at the text above you can see that I've added the ?subject= parameter to the email and that the subject's lines value will be "I love TextFixer.com"
Email HTML Code with Subject and Body
You can even go one step further and add text that will appear in the body of the email. At this point all the person has to do is press send. I think there are very few circumstances where you would need to add the body value but for the sake of completeness here's what the email code would look like.
Please email me at <a href="mailto:[email protected]?subject=I love TextFixer.com&body=I learned to create email link code on this website.">[email protected]</a>
Working example of this code: Please email me at [email protected].
That's about it. It's pretty simple to create the email HTML code for the email link. You just have to make sure not to break the email mailto string by using letters that should be encoded.
Now that you know everything about HTML email links you should now be able to easily embed email link code into your webpages or HTML newsletters.
Most Popular Text Tools
- Remove Line Breaks: Remove unwanted line breaks from your text.
- Random Word Generator: Generate a list of random words. Great tool for brainstorming ideas.
- Alphabetical Order: Alphabetize all sorts of text content with this tool.
- Text to HTML: Automatically change plain text into HTML paragraphs.
- HTML to Text: Remove all HTML tags, leaving only text content.
- Word to HTML: Convert a Word document into clean HTML code.
- Online Sentence Counter: Quickly count the number of sentences in your content.
- Random Choice Generator: Randomly pick a choice from a list of options.
- Reverse Text Generator: Create social media posts or any text in reverse text.
- Remove Duplicate Lines: Remove all of the identical lines in your content.
- Paragraph to Single Line: Convert any multiple paragraphs to a single line.
Alphabetical Tools
Random Generators
- Random Word Generator
- Random Sentence Generator
- Random Noun Generator
- Random Adjectives Generator
- Random String Generator
- Random Letter Generator
- Random Decision Maker
- Random Number Generator
- Random Password Generator
- Random Choice Generator
Line Break Tools
Fun Text Tools
- Reverse Text
- Fake Word Generator
- Repeat Text Generator
- Tiny Text Generator
- Cursive Text Generator
- Bold Text Generator
Text Changing Tools
- Find and Replace Online
- Capitalize the First letter of Sentences
- Uppercase or Lowercase Text
- Remove Spaces Online
- Replace Tabs with Spaces
- Capitalize Each Word
- Remove Numbers from Text
SEO and Word Tools
- Word Counter
- Sentence Counter Online
- Character Counter
- Title Capitalization Tool
- Meta Description Length Checker
Content Conversion Tools
- Convert a Word Doc to HTML
- Convert Word Doc to Text
- Convert Plain Text to HTML
- Convert Email to HTML
- Convert URLs to HTML Links
- Convert CSV Text to HTML Table
- HTML to Text
HTML Code Generators
- HTML Table Generator
- HTML List Generator
- HTML Text Generator
- Javascript Pop-up Window Maker
- Mailto Link Generator
- Remove HTML Tags