In this lecture we can explore link creation within our to email document we'll be creating both text
links as well as image links let's start with adding a link on the images we inserted in the last lecture
we'll link each vacation picture to a relevant Web site to do so we'll be using the eight tags add the
following code around your first image
we'll start with the opening 8a
followed by the H R E F attribute
this attribute specifies where this image will link to and we have to include the concrete you are.
In this case we're going to have it linked to Miami dot com.
Be very careful not to make any typos in the U.R.L. otherwise the link will not work
and that's it for the first link.
You'll notice that the closing tag and the opening tag do encompass the image tag and the image attributes
it so the link must encompass the entire image from the from the opening tags to the closing
and let's just go ahead and apply a few other links as well to the other images.
Now I'll just copy and paste this code to save time and I'll change the link source
and now that I have all my links created and attached to the images I'll go ahead and save my file.
And preview this in the web browser to make sure that all the links do work.
So right away when I hover my mouse over these images I can tell that a link is attached to the image
because the cursor changes
let's just go ahead and click on each one to make sure that the links do work
so it appears that each link does work and that's how you apply links to images.
Now let's go ahead and create textual links.
Now the process of adding links to text is identical but first we have to create a few lines of text
to apply links to.
So let's go ahead and create a new paragraph.
And then just typed some text
and we'll just indent this text and now we can begin adding the text links
we use the same links that we used last time because we know they were
just copy and paste from the other links we created
Okay so now that we have our link supplied we can go ahead and just save the file we'll test one of
them just to make sure it works.
Sure you get the idea
so we can see our list there and we'll just click on for the dot com and it does go to Miami dot com
Web site.
Now one thing you'll notice is when I clicked on the link it opened the link in the same browser window
is our original page.
A lot of times what you might need to do is open open the link in a new browser window so then that
way the original window doesn't close and the viewer can very easily revert back to it.
And in order to do that we need to add a target attribute to our 88 so the target attribute looks like
this
and to specify that we want this page to open in a new browser window.
You put an underscore and type blank within the quotations and that'll open in a new blank window.
That's what that means.
So just copy and paste that attribute into the other links
and then save your file and previewed in the browser.
So now we can see that the link opens in a separate browser window and it's very a lot more convenient
to switch back to our original page without having to press the back button
and it looks like each one is working in opening in a separate browser window.