Mohammed Mohsen 2011. Links Links are what make the World Wide Web web-like one document on the Web can link to several other documents, and those.

Slides:



Advertisements
Similar presentations
4.01 How Web Pages Work.
Advertisements

XP 1 Developing a Basic Web Site Tutorial 2: Web Site Structures & Links.
Developing a Web Site: Links Using a link is a quicker way to access information at the bottom of a Web page than scrolling down A user can select a link.
HTML5 and CSS3 Illustrated Unit E: Inserting and Working with Links
Links and Comments.
New Perspectives on Creating Web Pages with HTML
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
XP Adding Hypertext Links to a Web Page. XP Objectives Create hypertext links between elements within a Web page Create hypertext links between Web pages.
Web Structure Create Links Using HTML. 2 Objectives List different types of Web site structures and how to employ them Create element ids to mark specific.
Topics in this presentation: The Web and how it works Difference between Web pages and web sites Web browsers and Web servers HTML purpose and structure.
Computer Science 103 Chapter 2 HyperText Markup Language (HTML)
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
XP 1 Developing a Basic Web Site Creating a Chemistry Web Site Tutorial 2.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Chapter 14 Introduction to HTML
XP Tutorial 2New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Developing a Basic Web Site Creating a Chemistry Web Site Tutorial 2.
Internal and External Links Web Design – Section 3-6 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Lecturer: Ghadah Aldehim
CNIT 132 – Week 3 HTML (2). Working with Links Using a link is a quicker way to access information at the bottom of a Web page than scrolling down. A.
XHTML Introductory1 Linking and Publishing Basic Web Pages Chapter 3.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
XP 1 New Perspectives on Creating Web Pages with HTML Adding Hypertext Links to a Web Page.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 4: Creating Hyperlinks Kelly L.
XHTML Louise Soe updated September 2009.
Developing a Web Site. Web Site Navigational Structures A storyboard is a diagram of a Web site’s structure, showing all the pages in the site and indicating.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 2 1 New Perspectives on Creating Web Pages With HTML Tutorial 2: Adding Hypertext Links to.
1.  Use the anchor element to link from page to page  Configure absolute, relative, and hyperlinks  Configure relative hyperlinks to web pages.
Chapter 8 Introduction to HTML and Applets Fundamentals of Java.
ITEC 1001 Tutorial 1 Browser and Basics. Web browser software & Web pages The Web is a collection of files that reside on computers, called Web.
Adding Links Learning Web Design: Chapter 6. Lesson Overview Using the anchor tag Linking to other pages with relative or absolute pathnames Linking to.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
XHTML Hyperlinks. Creating Links to Other Web Pages A link, or hyperlink, is a specially formatted Web page object that the user can click to open a different.
Creating Links. The Anchor Element: The anchor tag can be used in three different ways: 1.External link – to link to a web page outside your own website.
Internal and External Links Web Design – Section 3-6 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Tutorial 2 Developing a Web Site. XP Objectives Learn how to storyboard various Web site structures Create links among documents in a Web site Understand.
Introduction to HTML. Today’s Discussion What is HTML ? What is HTML ? What is Web Page ? What is Web Page ? Web Server Web Server Web Browser Web Browser.
1 UNIT 13 The World Wide Web Lecturer: Kholood Baselm.
HTML BTEC National in Computing Section5. Create Information “HTML: defining HTML, discussing HTML uses and demonstrating HTML basics, HTML structure…..
XP 1 HTML Tutorial 2: Developing a Basic Web Site.
Internal and External Links Web Design – Section 3-6 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Chapter 6 Links. 3 Parts of Links 1. Destination: defines what happens when a user clicks the link. 2. Label: this is the text (or possibly an image)
XP INFT 140 – Chapter 2 1 Developing a Basic Web Site Creating a Chemistry Web Site.
HTML Links HTML uses a hyperlink to another document on the Web.
Developing a Basic Web Site HTML Tutorial 2. Objectives Define links and how to use them. Create element ids to mark specific locations within a document.
Session: 4. © Aptech Ltd. 2Creating Hyperlinks and Anchors / Session 4  Describe hyperlinks  Explain absolute and relative paths  Explain how to hyperlink.
The Internet, Fourth Edition-- Illustrated 1 The Internet – Illustrated Introductory, Fourth Edition Unit B Understanding Browser Basics.
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
Microsoft Office 2008 for Mac – Illustrated Unit D: Getting Started with Safari.
1 UNIT 13 The World Wide Web. Introduction 2 Agenda The World Wide Web Search Engines Video Streaming 3.
1 UNIT 13 The World Wide Web. Introduction 2 The World Wide Web: ▫ Commonly referred to as WWW or the Web. ▫ Is a service on the Internet. It consists.
HTML5 and CSS3 Illustrated Unit E: Inserting and Working with Links.
4.01 How Web Pages Work.
4.01 How Web Pages Work.
Technologies and Applications
Internal and External Links
Internal and External Links
Links and Comments.
E-commerce | WWW World Wide Web - Concepts
E-commerce | WWW World Wide Web - Concepts
CS7026: Authoring for Digital Media HTML Authoring
Windows Internet Explorer 7-Illustrated Essentials
CNIT 131 HTML5 – Anchor/Link.
Links and Comments.
Links and Comments.
Links and Comments.
4.01 How Web Pages Work.
Presentation transcript:

Mohammed Mohsen 2011

Links Links are what make the World Wide Web web-like one document on the Web can link to several other documents, and those in turn to other documents, and so forth. The resulting structure, if diagramed, resembles a web. The comparison has spawned many "web" terms commonly used on the Internet— electronic robots that scour the Web are known as "spiders," and so on. Besides linking to other documents, you can link to just about any content that can be delivered over the Internet—media files, addresses, FTP sites, and so on.

What's in a Link? Web links have two basic components, the link and the target. The link is the text in the main document that refers to another document. The target is the document (or particular location in the document) to which the link leads.

DNS(The Domain Name System ) Although programs theoretically could refer to hosts, mailboxes, and other resources by their network (e.g., IP) addresses, these addresses are hard for people to remember. Also, sending to means that if Ali's ISP or organization moves the mail server to a different machine with a different IP address, her address has to change.

As mentioned in the introduction to this chapter, you can link to other things besides HTTP documents. All you need is the URL (Uniform Resource Locator, previously Universal Resource Locator)of the item you wish to link to, and the protocol necessary to reach the item. This URL consists of three parts: the protocol (http), the DNS name of the host ( and the file name (web/index_n.html), with certain punctuation separating the pieces. The file name is a path relative to the default Web directory at m-mohsen.com.

For example, if you wanted to link to a document on an FTP site, you could use an anchor tag similar to the following: Zipped copy of the files Note that the protocol is specified (ftp: instead of and the server name is specified (ftp.example.com), as is the path and filename (/pub and example.zip). A similar method can be used to link to an address Clicking such a link will generally spawn the user's client ready to send an to the address specified.

Linking to a Web Page The most popular link style on the Web is a link to another Web page or document. Such a link, when activated, causes the target page to load in the client browser. Control is then transferred to the target page—its scripts run, and so on. To link to another page on the Internet, you simply specify the target's URL in the anchor tag. Suppose you want to link to the products page of the Acme Web site and the page is named products.html and resides in the products directory on the Acme Web server. The href parameter of the link would be as follows: Note that the URL ( contains the protocol, the server name, the directory name, and the filename. Figure 7-2 shows a breakdown of the various pieces of the URL.

In the case of this URL, the various pieces are separated by various key characters:  The protocol is first, and ends with a colon (  The server name is next, prefaced with a double slash (//  The directory (or directories) is next, separated with slashes (/products/).  The filename of the page is last, separated from the directory by a slash (products.html ).

Absolute versus Relative Links There are two types of URL styles, and therefore two link types, that you need to understand: absolute and relative. You have seen absolute links, where the URL used in the link provides the full path, including the protocol and full server address. These links are called absolute links because the URL itself is absolute that is, it does not change no matter where the document in which it appears is kept. The other type of link, a relative link, does not provide all of the details to the referenced page; hence, its address is treated as relative to the document where the link appears. Relative links are only useful for linking to other pages on the same Web site, because any reference off of the same site requires the remote server's name. It's easier to understand the difference between the two types of links with an example. Suppose you are the Webmaster of example.com. You have several pages on the site, including the home page, a main products page, and hardware and software products pages. The home page is in the root directory of the server, while the product pages (all three) are in a products directory. The relative links back and forth between the pages are shown in Figures 7-3 and 7-4.example.com

Note: that you can use directory shortcuts to specify where the pages are:  Starting a directory with a slash (/) references it as a subdirectory of the root directory.  Starting a directory with a period and a slash (./ ) references it as a subdirectory of the current directory (the directory where the current page resides).  Starting a directory with a double period and a slash (.. / ) references it as a parent directory to the current directory.

Relative links are easier to maintain on sections of Web sites where the pages in that section never change relationships to one another. For example, in the case of the site shown in Figures 7-3 and 7-4, if the products pages move as a whole unit to another place on the site, the relative links between the product pages won't change. If the links were coded as absolute (for example, products/hardware.html), they would have to change. Link Targets Normally, links open the page they refer to in the active browser window, replacing the page currently displayed. However, you can control where the page opens using the target attribute in the link tag.

Link Titles You can also title a link, using the title attribute in the anchor tag. This causes most current browsers to display the text of the title as a ToolTip when the mouse hovers over them. For example, the following link will cause Internet Explorer 6 to display "Example.com's Web Site," Keyboard shortcuts Each link can be assigned a shortcut key for easy keyboard-only access using the accesskey attribute with the anchor tab. The accesskey attribute takes one letter as its value, the letter that can be used to access the link. For example, the following link defines "C" as the access key: Table of C ontents Tab order It will also help your users if you define a tab order for the links in your document. As with most graphical operating systems, the tab key can be used to move through elements of the interface, including links. first link

Creating an Anchor Anchor tags have another use; they can be used as a marker in the current document to provide a bookmark that can be directly linked to. For example, a large document might have several sections. You can place links at the top of the document (or in a special navigation frame) to each section, allowing the user to easily access each section. To create an anchor in a document, you use the anchor tag with the name attribute. For example, the following code creates a chapter01 anchor at the "Chapter 1" heading: Chapter 1 To link to the anchor you use a standard link, but add the anchor name to the end of the URL in the link. To identify the name as an anchor, you separate it from the rest of the URL with a pound sign (#). For example, suppose the Chapter 1 anchor appears in the document book.html. To link to the Chapter 1 anchor, you could use the following code: Go to Chapter 1

Note Because the URL in the link tag can contain the server and document names as well as the anchor name, you can link to anchors in the same document or any accessible document. If you are linking to an anchor in the same document, you can use a shortcut form of the URL, using only the pound sign and the anchor name as the URL. In addition to using the anchor tag for bookmarks, you can link to a block element's id attribute. For example, if Chapter 1 appears inside an tag, you can set the tag's id attribute to Chapter1 and omit the anchor link altogether, as shown in the following code example: Chapter 1