Procuring digital preservation CAN be quick and painless with our new dynamic...
HTML Links: A Guide to Text, Image, Email and Download Links
1.
2. HTML Links
Text Links
Image Links
Email Links
A webpage can contain various links that take you directly to other
pages and even specific parts of a given page.
These links are known as hyperlinks.
Hyperlinks allow visitors to navigate between Web sites by clicking
on words, phrases, and images.
Thus you can create hyperlinks using text or images available on a
webpage.
Linking Document
<a href= “ www.classroomtech.in “ target attribute_list> Linked Text </a>
3. Target Attribute
This attribute is used to specify the location where linked document is opened.
Option Description
_blank Opens the linked document in a new window or tab.
_self Opens the linked document in the same frame.
_parent Opens the linked document in the parent frame.
_top Opens the linked document in the full body of the window.
targetframe Opens the linked document in a named targetframe.
4. Use of Base Path
We can use the relative path instead of using absolute path every time.
Use <base> tag in your HTML
document header.
This tag is used to give a base path
for all the links.
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
<base href="http://www.classroomtech.in/">
</head>
<body>
<a href="/html/webseries.htm"
target="_blank">HTML Tutorial</a>
</body>
</html>
http://www.classroom.com /html/webseries.htm
Web Series – HTML and HTML5
5. Setting Link Colors
LINK, VLINK, and ALINK
LINK - initial appearance – default = Blue
VLINK - visited link – default = Purple
ALINK - active link being clicked – default = Red
These attributes control the colors of the different link states:
<BODY BGCOLOR=”#FFFFFF” TEXT=”#FF0000”
LINK=”#0000FF” VLINK=”#FF00FF” ALINK=”FFFF00”>
The results of the above BODY element would be a white background with
links being blue, visited links as magenta and active links colored in
yellow.
While you are working
in a webpage through
link it is active as soon
as u close that window
it becomes vlink.
Satyaki Das | Contact No. 8981838547 .
6. <a href="default.asp">
<img src=“student.png" style="width: 42px; height:42px; border:0;">
</a>
Use the <a> element to define a link
Use the href attribute to define the link address
Use the target attribute to define where to open the linked document
Use the <img> element (inside <a>) to use an image as a link
Use the id attribute (id="value") to define bookmarks in a page
Use the href attribute (href="#value") to link to the bookmark
7. <!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
<a href = "https://www.classroom.in/page.pdf">Download PDF File</a>
</body>
</html>
Download Links
You can create text link to make your PDF, or
DOC or ZIP files downloadable. This is very
simple; you just need to give complete URL of
the downloadable file as follows