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.
<!DOCTYPE html> <html> <head> <title>HTML Email with subject</title> </head> <body> <h1>Contact</h1> <p>For any queries:<a href="mailto:email@example.com?Subject=My%20Query">Contact us</a></p> </body> </html>