1 / 11

Tutorial 2

Tutorial 2. Links. Hypertext links are used to…. Point to a different section on the same page Point to a different web page Point to a variety of different web objects. Links within the same page. First we need to mark the destination text with an anchor

laith-welch
Download Presentation

Tutorial 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tutorial 2 Links

  2. Hypertext links are used to…. • Point to a different section on the same page • Point to a different web page • Point to a variety of different web objects

  3. Links within the same page • First we need to mark the destination text with an anchor • This is done by putting <a href=“#name”> before the destination text, and </a> after • In this example name is the name of the anchor

  4. Then we need to create a link, identifying the anchor that goes with this link • < a href=“#name”>Classes</a> • Now when a user clicks on this link he will be directed to the anchor and the destination text • Note that the # is NOT optional

  5. Different Web Page Structures • Make sure you read through the different structures on pages 2.12-2.14

  6. Linking to Another Web Page <a href= “contact.htm”>Contact me </a> produces the text “Contact me” identified as a link Clicking on this link will send the user to the page contact.htm In this example contact.htm MUST be in the same folder as the original web page

  7. Suppose the link is on your page which is located in the folder C:\Homework, but the page you want to link to is located in C:\labwork\junk You must now create the link by writing <a href= “C:\labwork\junk\contact.htm”> Contact me </a>

  8. Link to other documents on the internet <a href = http://www.sxu.edu> sxu’s website</a> If you want it to open in a different window: <a href=“url” target = window>hypertext</a> Window is the name of the window – it can be anything. If the windows are the same name, the pages will all open in the same window – so you get different windows by using different names

  9. <a href = “http://www.sxu.edu/cs.html#majors”> computer science majors</a> links to an anchor called majors on the webpage called cs.html which is on sxu’s website, www.sxu.edu See page 2.29 for instructions how to create a link to an email address.

  10. Labwork: When complete, upload all to your private directory on csmaster and email me the links. (one link per case) Complete the tutorial page 2.03- 2.22. Case 1. Case 2 Homework: Due Sat 11th Sept at midnight Case 3

More Related