HTML Code for Email link

What is an Email Link in HTML?

An email link in HTML is a hyperlink that, when clicked, opens the user's default email application and populates the 'To' field with the specified email address.

Creating an Email Link

To create an email link in HTML, you can use the <a> (anchor) tag along with the 'mailto' attribute to specify the email address. When a user clicks this link, it will prompt their default email client to send an email to the specified address.

The 'mailto' Attribute

The 'mailto' attribute is used within the <a> tag to specify the recipient's email address. It is preceded by 'mailto:' followed by the email address. Additionally, you can include a subject line by appending '?subject=' followed by the desired subject.

Example Code

<a href="mailto:[email protected]?subject=Feedback">Send Email</a>

Go from files to website in seconds.

Start a free trial for 7 days — no credit card required

Get Started for Free