Hyperlink Tutorial
Hyperlink Tutorial
Hyperlink basics
Course contents
Overview: Becoming familiar with hyperlinks
Hyperlink basics
Most lessons include a list of suggested tasks and a set of test questions.
Hyperlink basics
Course goals
Identify and use absolute and relative URLs.
Insert hyperlinks that go to pages in your Web site and to pages in other Web sites. Insert a hyperlink to a specific place in a page. Insert a hyperlink to an e-mail address. Update hyperlinks across multiple pages. Find and fix broken hyperlinks.
Hyperlink basics
Lesson 1
Hyperlinks and URLs
3. Click Hyperlink. From there, you have many different options to choose from.
Hyperlink basics
Hyperlink basics
Hyperlink basics
In the picture, Microsoft Web site is an example of a hyperlink. Underneath it is what the HTML looks like for the link.
Hyperlink basics
Hyperlink basics
What is a URL?
http://www.microsoft.com/default.htm
An example of a URL
A URL is a unique address for a file on the Internet. URL stands for Uniform Resource Locator. Meaning, URLs can locate a resource like a Web page, picture, or sound file. You no doubt have seen URLs in the Address bar of your Web browser as you browse the Web. A typical example of a URL is shown here.
Hyperlink basics
U is for uniform
So once again, URL stands for Uniform Resource Locator. By now, youre probably wondering what the word uniform refers to.
Components of a URL
URLs are uniform because they adhere to a consistent syntax, or format. The URL syntax is shown on the left.
Hyperlink basics
U is for uniform
Heres an explanation of the different parts of the syntax: 1. Protocol. The protocol is usually http://, which stands for Hypertext Transfer Protocol. This is the method used to access a page or file on the World Wide Web. 2. Web server. This is the server computer that contains the file you want to link to.
Hyperlink basics
Components of a URL
U is for uniform
Heres an explanation of the different parts of the syntax: 3. Path. This is the folder or folders that contain the file you want to link to. Here, office and productsinfo are two folders that make up the path. 4. File name. This is the name of the actual file you want to link to.
Components of a URL
Hyperlink basics
U is for uniform
Heres an explanation of the different parts of the syntax: 5. Anchor. Also known in FrontPage as bookmarks, anchors are an optional item in the syntax. The # symbol separates the anchor from the rest of the URL.
Components of a URL
Hyperlink basics
Test 1, question 1
Which of the following is true about a URL? (Pick one answer.) 1. It only points to files on your hard disk. 2. It is a unique address for a file on the Internet. 3. It is a unique way to display blue, underlined text.
Hyperlink basics
Hyperlink basics
Test 1, question 2
URL stands for which of the following? (Pick one answer.) 1. United Retail Locator. 2. Universal Resource Locator. 3. Uniform Resource Locator.
Hyperlink basics
Hyperlink basics
Test 1, question 3
Which part of the following URL is the path? (Pick one answer.)
http://www.microsoft.com/office/default.htm#section
2. office/default.htm#section
3. office
Hyperlink basics
The path comes after the Web server name (also referred to as the domain) and before the file name. In this case, www.microsoft.com is the domain, and default.htm is the file name.
Hyperlink basics
Lesson 2
Absolute and relative URLs
Along with three familiar-looking hyperlinks, this Web page has pictures. While the pictures appear seamlessly within the page, they arent embedded or stored within the page itself. Instead, they are referenced in the HTML with URLs.
Hyperlink basics
Given that URLs are used so frequently, its important to understand that there are two kinds of URLs: absolute and relative.
Hyperlink basics
Notice that it has all the required parts of the URL syntax shown in the previous lesson.
Hyperlink basics
Figure 2 contains four examples of relative URLs. These URLs look drastically shorter. But dont be fooled by their meager appearance. Even though theyre shorter, there are significant advantages to using them.
Hyperlink basics
Absolute URLs
http://www.microsoft.com/default.htm
Absolute URLs contain absolutely every piece of the URL syntax shown earlier (except the anchor, since thats optional).
Absolute URLs are good to use when you need to link to a page outside your Web page. For example, if you wanted to link to someone elses site for additional information, youd use an absolute URL for that link.
Hyperlink basics
Relative URLs
Relative URLs are shorterthey dont contain every part of the URL syntax. For the parts of the syntax that arent specified, the browser uses the parts of the current page.
A relative URL locating a page in the same folder
This is why theyre called relative URLs, because their location is relative to the current page.
Hyperlink basics
Relative URLs
One of the most common relative URLs has only a file name, like this:
default.htm
The browser assumes that the missing parts of the URL syntax are the same as the current page. It just has to find the default.htm file in the same folder as the current page.
Hyperlink basics
Relative URLs
For two reasons, you should always use relative URLs to link to pages within your site: Theyre shorter and therefore easier to use when inserting hyperlinks in your Web pages.
A relative URL locating a page in the same folder
Most importantly, if you end up moving a group of pages, then you dont have to change all of the URLs if the pages are in the same relative position to each other.
Hyperlink basics
Hyperlink basics
Hyperlink basics
Hyperlink basics
Inside that folder, it finds the pricing folder. Finally, it opens list.htm.
Hyperlink basics
Hyperlink basics
Note: You might see URLs with many periods and forward slashes, for example, ../../default.htm. Each ../ represents a folder thats further up in the hierarchy.
Hyperlink basics
Hyperlink basics
Test 2, question 1
Whats the primary difference between an absolute and a relative URL? (Pick one answer.) 1. A relative URL links to information that is related to your site, and an absolute URL doesnt. 2. A relative URL contains the entire URL syntax, and the absolute URL doesnt. 3. An absolute URL contains the entire URL syntax, and a relative URL doesnt.
Hyperlink basics
Hyperlink basics
Test 2, question 2
If you want to link to a file named News.htm, and that file is in the same folder as the current page, then what would the relative URL be? (Pick one answer.) 1. ../News.htm 2. News/News.htm
3. News.htm
Hyperlink basics
Since no other part of the URL syntax is specified, the browser would find the News.htm file in the same folder as the current page.
Hyperlink basics
Test 2, question 3
If you click a link that has the URL ../products.htm, what will the browser do? (Pick one answer.) 1. The browser will open products.htm, which is two folders up from where the current file is.
2. The browser will open products.htm, which is one folder up from where the current file is.
3. The browser will open products.htm, which is inside a hidden folder.
Hyperlink basics
Hyperlink basics
Lesson 3
Hyperlink destinations
Hyperlink destinations
Lets talk about the different places hyperlinks can take you and cover some strategies both for using each destination option and deciding which one is right for any given situation. This lesson will cover some of the more common destinations: another Web site, another file on your site, a specific place within a page, and an e-mail address.
Hyperlink basics
Hyperlink basics
Hyperlink basics
Hyperlink basics
However, if your site moves at any time, the path of the absolute URL might not be correct anymore, and the link might break.
Using a relative URL, hyperlinks can go to pages within your site.
Hyperlink basics
Hyperlink basics
Hyperlink basics
Hyperlink basics
Hyperlink basics
For example, Contact Us and Send us your feedback are typical phrases to use with these links.
A link to an e-mail address
Hyperlink basics
Hyperlink basics
When visitors to your site click this link, their browser will try to access C:\folder\filename.doc on their own computer. Chances are, they wont have the file and they will get an error message.
Hyperlink basics
Hyperlink basics
Hyperlink basics
Test 3, question 1
The best time to use an absolute URL is when you need to link to a page that is where? (Pick one answer.) 1. Inside your Web site. 2. Inside another folder within your Web site.
Hyperlink basics
Hyperlink basics
Test 3, question 2
Before linking to a specific place in a page, you must insert which of the following? (Pick one answer.) 1. Hyperlink.
2. Bookmark.
3. Placeholder link.
Hyperlink basics
You need to insert a bookmark before you can link to a specific place in a page.
Hyperlink basics
Test 3, question 3
If you want to store a Microsoft Office Word document in your Web site and then link to it, what should you do first? (Pick one answer.) 1. Convert the Word document into HTML by selecting Save as Web Page.
2. Publish the Word file to your site by selecting Publish on the File menu.
3. Just import the file.
Hyperlink basics
To import the file, you click Import on the File menu. This will store the document in the Web site folder and you can link to it easily from there.
Hyperlink basics
Lesson 4
Update hyperlinks across multiple pages
A FrontPage Web site, with the Web Site tab appearing at the top
Renaming files
If you rename a file in your FrontPage Web site, you will see this message if one or more pages have hyperlinks that go to that file.
This message appears when you rename a file.
When you click Yes, FrontPage will automatically update all hyperlinks to point to the new name of the file.
Hyperlink basics
Moving files
If you move a file in your FrontPage Web site, youll see this message.
This tells you that although youre moving a file, FrontPage is now renaming the location of that file for you in all pages that link to it.
Hyperlink basics
Hyperlink basics
Hyperlink basics
Hyperlink basics
Test 4, question 1
If you had a FrontPage Web site and you added, renamed, or moved files using another program, which of the following would let FrontPage catch up with the changes you made? (Pick one answer.) 1. The Recalculate Hyperlinks feature. 2. The Broken Hyperlinks report. 3. The Hyperlinks view.
Hyperlink basics
Recalculating hyperlinks will allow FrontPage to catch up with the changes you made.
Hyperlink basics
Test 4, question 2
If you move a file from one folder to another within a FrontPage Web site, what will happen? (Pick one answer.) 1. FrontPage will ask if you want to update the links to the file. 2. FrontPage will move the file and update all the links to it, without warning you.
3. FrontPage will warn you, to make sure you dont inadvertently move the file.
Hyperlink basics
Hyperlink basics
Lesson 5
Fix broken hyperlinks
Hyperlink basics
Hyperlink basics
Hyperlink basics
Hyperlink basics
Hyperlink basics
Hyperlink basics
Test 5, question 1
Which of the following error messages may be due to a broken hyperlink? (Pick one answer.) 1. Page cannot be displayed 2. Unauthorized 3. Service Unavailable
Hyperlink basics
This is a typical error message that Web visitors may get when clicking a broken hyperlink.
Hyperlink basics
Test 5, question 2
What is the difference between an internal link and an external link? (Pick one answer.) 1. Internal links point to pages, and external links point to folders. 2. Web visitors can see external links, but they cant see internal ones.
3. Internal links go to pages within your Web site, and external links go outside your site.
Hyperlink basics
Hyperlink basics
Test 5, question 3
What does it mean when a hyperlink is marked as Unknown? (Pick one answer.)
1. It means that the link is an internal link, and hasnt been verified by FrontPage yet.
2. It means that the link is an external link, and is broken. 3. It means that the link is an external link, and hasnt been verified by FrontPage yet.
Hyperlink basics
To verify the link, you can right-click the link. Or, FrontPage will automatically prompt you to verify it.
Hyperlink basics
Hyperlink basics