Home / Articles / Programming languages / Markup languages / HTML & CSS / Creating link to email address in HTML

Creating link to email address in HTML

Creating link to email address in HTML
 
Creating link to email address in HTML
  • Currently 0 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 0/5 (0 votes cast)

Thank you for rating!

You have already rated this page, you can only rate it once!

Your rating has been changed, thanks for rating!

Log in or create a user account to rate this page.


Creating a link to an email address is almost identical to creating a link to a web page. But instead of the URL designate mailto: email address (example 1).

Example 1. Link to the e-mail address.

<a href="mailto:ask@gmail.com">Ask your questions via e-mail</a>

Such a link is identical to the link to a web page, but if you click it, a default e-mail program will run. Therefore, for the user to know what will be run the name of the link should indicate that it's an e-mail.

You can also automatically add a subject message, by adding to the e-mail's address, with the help character question mark (?), parameter subject="Subject" (example 2).

Example 2. Setting the subject.

<a href="mailto:ask@gmail.com?subject=Question about HTML">Ask your questions via e-mail</a>

Now if you start the e-mail program the field Subject will be filled automatically.


 

Read also

How to create a link in HTML

How to create a link in HTML

Parameter target in HTML

Parameter target in HTML

Image as a link in HTML

Image as a link in HTML

Post comment

basicuse.net
html5_css
106160485398655174790

Quick navigation

General navigation