How to create a link to send email with a subject in HTML?

To create a link to send email, use <a> tag, with href attribute. The mail to link is added inside the <a> tag. To add a subject, you need to add ? and then include the subject. All this comes inside the <a> tag.

Just keep in mind to add the email address where you want to receive the email in the mail to link. Also, the spaces between words for the subject shouldn’t be space, instead include %20. This is to ensure the browser displays the text properly.


You can try to run the following code to create a link to send an email with a subject in HTML.

Live Demo

<!DOCTYPE html>
      <title>HTML Email with subject</title>

      <p>For any queries:<a href="">Contact us</a></p>

Updated on: 09-Jan-2020

18K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started