Presentation is loading. Please wait.

Presentation is loading. Please wait.

In this lecture, you will learn: ❑ How to link between pages of your site ❑ How to link to other sites ❑ How to structure the folders on your web site.

Similar presentations


Presentation on theme: "In this lecture, you will learn: ❑ How to link between pages of your site ❑ How to link to other sites ❑ How to structure the folders on your web site."— Presentation transcript:

1

2 In this lecture, you will learn: ❑ How to link between pages of your site ❑ How to link to other sites ❑ How to structure the folders on your web site ❑ How to link to specific parts of a page in your site

3 A link is specified using the element. Anything between the opening tag and the closing tag becomes part of the link a user can click in a browser. Hyperlinks allow visitors to navigate between web sites by clicking on words, phrases, and images. 3

4 1) The tags used to produce links are the and. The tells where the link should start and the indicates where the link ends. Everything between these two will work as a link. 2) The example below shows how to make the word Here work as a link to yahoo. Click here to go to yahoo.

5  To link to another document, the opening tag must carry an attribute called href; the value of the href attribute is the page you are linking to. Example: Return to the index page.  Index.html should be in the same folder, when you click the words “index page,” the index.html page will be loaded into the same window, replacing the current page.

6  If you want to link to a different site, you can use the following syntax, where you specify a full URL (Uniform Resource Locator) for the page you want to link to rather than just the filename. Example: Why not visit the Wrox Web site ?

7 Example: Please Contact us This is the first example of AJAX

8  Internal Links : Links can also be created inside large documents to simplify navigation. Today’s world wants to be able to get the information quickly. Internal links can help you meet these goals. 1. Select some text at a place in the document that you would like to create a link to, then add an anchor to link to like this: The id attribute of an anchor element specifies a location in the document that we link to shortly. All id attributes in a document must be unique. 2. Next select the text that you would like to create as a link to the location created above. Go To Book Mark 8 Internal Links

9 Destination Anchors Example: Linking and Navigation URLs Source Anchors Destination Anchors Examples

10 Source Anchors Example: This page covers the following topics: URLs Source Anchors Destination Anchors Examples

11  LINK - standard link - to a page the visitor hasn't been to yet. (standard color is blue - #0000FF). VLINK - visited link - to a page the visitor has been to before. (standard color is purple - #800080). ALINK - active link - the color of the link when the mouse is on it. (standard color is red - #FF0000). If the programmer what to change the color  Click here to go to yahoo. 11 More on LINKs

12 On clicking email links, a new e-mail is opened in your default e-mail program, ready for you to send an e-mail to that address. E.g. test@yahoo.comtest@yahoo.com Example: For support E-mail us 12 Linking to E-mail Addresses

13  Some less trustworthy inhabitants of the Web use little programs to automatically search web sites for e-mail addresses. After they have found e-mail addresses on web sites, they will start sending spam (junk mail) to those addresses.

14 ❑ Use an e-mail form instead so that visitors fill in a form on your web site to send you an e-mail. Once you have received the mail, you can then reply as normal because automated programs do not use contact forms to collect e-mail addresses. Use of an e-mail form requires either a CGI script or a server-side scripting language such as ASP.net, JSP, PHP, Cold Fusion, or Ruby. provides an example of an e-mail form. ❑ Write your e-mail address into the page using JavaScript. The idea behind this technique is that the programs that scour the Web for e-mail addresses cannot read the JavaScript version of an address.


Download ppt "In this lecture, you will learn: ❑ How to link between pages of your site ❑ How to link to other sites ❑ How to structure the folders on your web site."

Similar presentations


Ads by Google