Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Web Wizards Guide to HTML Chapter Four All About Hyperlinks.

Similar presentations

Presentation on theme: "The Web Wizards Guide to HTML Chapter Four All About Hyperlinks."— Presentation transcript:

1 The Web Wizards Guide to HTML Chapter Four All About Hyperlinks

2 Chapter Objectives Introduce three types of hyperlinks Explain how to add absolute URLs Explain how to add relative URLs Explain how to add named anchors Examine the problem of link maintenance

3 Different Types of Hyperlinks Absolute URLs point to Web pages on other Web servers Relative URLs point to Web pages on the same Web server Named Anchors point to a different location on the current Web page

4 All Hyperlinks Have Two Parts The Link Label is the visible element that the user points to and clicks (link labels can be text segments or images) The Link Destination is the location that the link takes you to when you click on the link Only the link destinations are handled differently for absolute URLs, relative URLs, and named anchors

5 Anchor Tags All hyperlinks are created with the anchor tag: this is a link label The href attribute is used to specify the link destination:

6 Absolute URLs All absolute URLs use complete URL addresses for their link destinations: UMass-Amherst Any Web page can be referenced by an absolute URL as long as you have its correct address

7 Relative URLs A relative URL need only specify a file name for its link destination: tree houses This assumes the destination file is in the same directory as the HTML file containing the link If the file is in a different directory, pathing information must be added to the href value

8 Named Anchors A named link destination specifies a location that has been marked by an anchor tag with a name attribute Some Good Lumber some good lumber The href value is prefaced with the # character but the name value is not

9 Named Anchors Combined with Other Links A named anchor can be added to an absolute or relative link as long as the destination being referenced contains that named anchor Some Good Lumber Just add a # followed by the anchors name to the end of the file name in the href value

10 Link Maintenance An absolute link that works today may not work tomorrow Dead links frustrate visitors and detract from your Web pages To keep all of your links operational, you have to test them periodically and update any that have died

11 Automated Link Checkers If you have a large number of links, you should automate the process of link testing You can subscribe to a Web-based service for link testing and weekly or monthly link reports You can obtain your own link testing software and run it yourself

Download ppt "The Web Wizards Guide to HTML Chapter Four All About Hyperlinks."

Similar presentations

Ads by Google