How to Create an Email to Link in a HTML Page
If you are creating an HTML page from scratch to learn basic web design skills, one of the last things you will want to do before saving and publishing your page is adding a "mailto" link--a link that your visitors can click to send an email to you. Add a mailto link to the body of your HTML page to embed your contact information in a website.
Instructions
-
-
1
Open the HTML page that you would like to add the email link to in Notepad or another text editor.
-
2
Use the arrow keys on the keyboard to move the cursor below the line that has the text "<body>." Text can be added anywhere between the "<body>" and "</body>" lines.
-
-
3
Type the text that should appear before your email link. For example, you may wish to use something such as "Click here to email me."
-
4
Type "<a href="mailto:mail@example.com?subject=Subj">Text</a>".
Replace "mail@example.com" with your email address, the word "Subj" with the subject heading for the email, and the the word "Text" with the word or phrase that you would like to be displayed in the visitor's web browser when they view the page. If your subject line contains multiple words, use the code "%20" rather than a space to make sure that it will be displayed correctly. -
5
Save the HTML file, then open it in a web browser. The mailto link will be shown in the page.
-
1
Tips & Warnings
The instructions given in this article should only be used to edit a web page that is static, such as those with an .HTM or .HTML file extension. It is usually not safe to directly edit pages that are dynamically generated by a content management system such as Joomla.