HTML and CSS Reference
In-Depth Information
Adding an E-mail Link
Adding an e-mail link is similar to adding a text link, but instead of using a URL as
the href attribute value, the href attribute value for an e-mail link uses the form:
E-mail Links
E-mail Links may not work
in a lab setting because
there may not be an
e-mail client installed on
the school servers. You
therefore may not be able
to test this link.
<a href=””>linktext</a>
where the href attribute value uses the word mailto to indicate it is an e-mail link,
followed by a colon and the e-mail address to which to send the e-mail message. When
the browser recognizes a mailto URL in a clicked link, it automatically opens a new
message in the default e-mail program and inserts the appropriate contact e-mail address
in the To field. The clickable text used for an e-mail link typically is the e-mail address
used in the e-mail link. The Web page should also provide some information before the
link, so visitors know the purpose of the e-mail link.
To Add an E-mail Link
The Underwater Tours by Eloise home page includes an e-mail link so customers can contact Underwater
Tours by Eloise for additional information or to comment on the Web page. The <a> and </a> tags used to create a
text link to a Web page are also used to create an e-mail link. The following step shows how to add an e-mail link to
a Web page.
Click immediately
to the left of the u
in the beginning of
on line 19. Type <a
.com”> as the start of
the e-mail link. This
will link to the e-mail
address underwater-
when the link
is clicked.
line 19
end anchor
tag </a>
e-mail link
Click immediately
text that displays
on Web page
surrounded by
e-mail link tags
after the m in
and before the period
in the e-mail address
text on line 19.
</a> to end the
e-mail link, as shown in
Figure 3-14.
Figure 3-14
I see two occurrences of on line 19. Why do I need two?
The first occurrence of (the one within the link <a> tag following the mailto:) is the
destination of the link. The second occurrence of the e-mail address is the text link itself that will be displayed in the
Search WWH ::

Custom Search