Lecture 5
Lecture 5
webpage authoring /
web Fundamentals
Links & images
A link is the "address" to a document (or a resource) on the
web
One of the greatest strengths of Hypertext Markup
Language is hypertext – the ability to link documents
together. The World Wide Web itself consists of millions of
html documents all linked together via hypertext. A good
web site designer should be able to use hyperlinks to make
it easy for visitors to not only move around their site easily,
but to also get to related sites. The key is to enable people
to get to what they want as quickly and easily as possible
Hyperlinks, Anchors, and
Links
In web terms, a hyperlink is a reference (an address)
to a resource on the web.
Hyperlinks can point to any resource on the web: an
HTML page, an image, a sound file, a movie, etc.
An anchor is a term used to define a hyperlink
destination inside a document.
The HTML anchor element <a>, is used to define
both hyperlinks and anchors.
We will use the term HTML link when the <a>
element points to a resource, the term HTML anchor
when the <a> elements defines an address inside a
document..
The most common use for the anchor tag is to provide a link to
E.g. If you wanted the text see our product list to be used as a
There are two types of hyperlinks you can use in your html -
</A>.
It is a common practice to make the email address itself into
an email link.
E.g. If you wanted the text [email protected] to appear on
u </A>
The target Attribute
The target attribute defines where the linked
browser window:
Examples
<a href="http://www.w3schools.com/"
target="_blank">Visit W3Schools!</a>
<a href=“file.html” target="_blank">visit my file</a>
Exercise
that can be used to get to other pages in the site. The navigation links
will go along the top of the page similar to the links shown below.
Note the vertical lines ( | ) that are used to separate each link so it is
easy for users to tell them apart. If you can’t find it on your keyboard
you can get it by holding down [Shift] and pressing \. (Note that on
most keyboards | looks like ¦ )
Home | About Us | Upcoming Events | Who's Who | Contacts |
Links
Between the body and the main heading, insert the following html.
This should be after the <BODY> tag and before the <H1> tag so
that it will appear at the top of the page above the heading.
<P ALIGN="center">
<A HREF="index.html">Home</A> |
<A HREF="contacts.html">Contacts</A> |
<A HREF="MAILTO:[email protected]">Send us an
email</A>
The Image Tag
It is rare these days to find a website without pictures
SRC=”picture.gif”></A>
Image tag attributes
ALT Specifies the text that will display while the picture is