Professional Documents
Culture Documents
Links in HTML
A hyperlink (or link) is a word, group of words, or
image that you can click on to jump to a new
document or a new section within the current
document.
When you move the cursor over a link in a Web page,
the arrow will turn into a little hand.
Links have three parts
Destination
is the file to be opened,
Label
is the portion in the page the user selects, and
Target
is the location where the file opens.
Destination
Relative path
If a linked file or image is in the same folder as the
hypertext link then only the file name needs to be
specified.
Absolute path
indicate the names of the drive and/or the folders that
specify where the linked file is located.
Anchor Tag <a>
An anchor is a piece of text which marks the beginning
and/or the end of a hypertext link.
The <a> tag can be used in two ways:
To create a link to another document, by using the href
attribute
To create a bookmark inside a document, by using the
name attribute
Anchor Attributes
HREF (Hypertext REFerence)
<html>
<head><title>link</title></head>
<body>
this is a sample of a link
</body>
<html>
Anchor Attributes
Target
specifies where to open the linked document.
Complex form
<a href="mailto:jeng_ventus@yahoo.com?subject=Feedback
for Web development students&body=The Tips and Tricks
section is great">E-mail me</a>
Output: E-mail me
Using the bare form
of the mailto:
A
A Carbon
Carbon Copy
Copy (CC),
(CC), and
and aa Blind
Blind
Carbon Copy (BCC) may also be
included to the complex by adding
“&cc=”
“&cc=” or
or “&bcc=“
“&bcc=“ toto the
the code
code
<a href="mailto:jeng_ventus@yahoo.com?subject=Sample of
using mailto&body=Now i know&cc=ventusj@dls-
csb.edu.ph">E-mail me</a>
<a href="mailto:?subject=Check this out &check out this
link http:\\www.letran.edu"> Send this page to a
friend</a>