Linking to an E-Mail Program in HTML

When a hyperlink points to an e-mail program, the user’s e-mail program is opened with a new message addressed to the specified e-mail address. To achieve this, the <a> element is also used, except that the value of the href attribute starts with mailto:, followed by the e-mail address to which you want the message to be sent. Figure 4.26 shows how it is done, and Figure 4.27 depicts the result. When the link is clicked by the user, the default e­mail client (program) on his or her computer is opened.

Source: Sklar David (2016), HTML: A Gentle Introduction to the Web’s Most Popular Language, O’Reilly Media; 1st edition.

Leave a Reply

Your email address will not be published. Required fields are marked *