Every author wants that visitors that are coming on his website, communicate with him about the article. I am also one of them, I also want that visitors on my website talk to me, I want encouragement if my article is useful to my visitors otherwise for improvement I also expect proper feedback from them. And for this, authors attach various forms on their website, such as feedback form, contact us form, etc. And apart from these options, there is another option, which is the most preferred option nowadays, and that emails us option. Through this option, any visitor can send feedback email to the author or admin of the website. This is definitely a value-added feature for any website. So today’s in this article we will learn how we can add an email link to a webpage using a simple HTML code snippet. So without wasting the time let’s see how to create an email link in HTML…
How to Create an Email Link in HTML
To create an email link in HTML, follow these simple steps…
1. In your HTML document, type the anchor tag “<a href=”. This begins the link in your HTML document. The “<a href=” attribute tells the browser that the following item is a link and from which Attribute “href” specifies the URL of the page the link goes to.
2.After beginning with “<a href=”, type “mailto”, just after the “=” sign, as you can see in the image. Now why “Mailto”, so we use this because “Mailto,” tells the browser that the following link is an email address, rather than a web page.
3. As I mentioned in the second point that we use “Mailto” because it tells the browser that the following link is an email, so it is easy to understand that after “Mailto” we have to type the user’s email next. Example : <a href = “mailto: [email protected]
4.Now if you want, you can proceed directly to the few last steps of this process, but if you want to make it a bit more effective, you can add some other points to it…
The point that I want to suggest you, is Add a pre-made subject-line. So if you want to add a pre-made subject line, first type a question mark (?) after the user’s email address, followed by the word “subject” and followed by an equals sign (=), followed by the subject inside a pair of quotation marks. You can understand it easily by the attached image. Now after adding it you HTML code should be look like this, <a href=mailto:[email protected]?subject=”subject text”
Other things that you can also add in your email forum are “body, cc or bcc line” via using the same syntax. What you need to do is just put a question mark after the word “body”, “cc”, or “bcc”, followed by an equals sign.
5. Now time to close the command we created so far. So for closing the command we use “>” closing bracket. The closing bracket sign “>” indicates the browser that there are no more commands to execute when the link is clicked
6. After closing the first command, type the link text. Link texts are those text, the user clicks on to open the email link. People often like to write phrases in Link Text, they use words like “Click here” to make it easier for visitors to understand. But it is not compulsory, you write there whatever you think is suitable, it can be a word, a phrase or email id.
7. Now type, after the link text to completely close that particular command. Now save your work, but make sure at the end your command should look similar to this (image)
So that is how you can create an email link in HTML. Hopefully, now you may have understood the process very well, but still, in future, if you get stuck anywhere in the process of creating an email link in HTML you can ask us in the comments section.