HTML - SPLessons

HTML Email Links

Chapter 17

SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

HTML Email Links

HTML Email Links

shape Introduction

This chapter demonstrates about the HTML Email Links, linking the emails to the web page is not an easy task because user can get the unnecessary spamming problems to the email account. Following are the concepts covered in this chapter.

  • Email Links

shape Description

User may get some spam problems if once linked the emails to the webpage. So in order to overcome this problem user have some options to make it simple for people to send the emails, one option is to utilize the HTML forms in order to collect the user information and the other way is to utilize Common Gateway Interface (CGI) or Hypertext Preprocessor (PHP) script language to send the email.

In order to linkup the emails with HTML use the <a> tag and to specify the address of the email along with link use href attribute. The syntax of the Email tag is as shown below.

<a href ="mailto:splessons@gmail.com">Send Email</a>

By running the above code will generate a link as shown in the below image.

If user click on the link browser will launch one Email Client installed on the users PC. In order to use these option user should install email client in PC.

The snippet code below demonstrates the default Email subject and Email body along with the Email address.

<a href="mailto:splessons@gmail.com?subject=Feedback&body=Message">
Send Feedback
</a>

By running the above code in a preferred browser user can get the following output as shown in below image.

Summary

shape Key Points

  • While linking the emails user can get spam problems.
  • User need to use the script language to send emails.