CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

9
CPSC 203 Introduction to Computers Lab 66 By Jie Gao

Transcript of CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

Page 1: CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

CPSC 203Introduction to Computers

Lab 66

By Jie Gao

Page 2: CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

March 12, 2003 CPSC Labs by Jie Gao

Links in Web Pages

Some time called “Hyper link” A mechanism to connect the web page to

other contents You can ‘travel” or “surf” in the Internet by

following the links

Page 3: CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

March 12, 2003 CPSC Labs by Jie Gao

What Can Links Provide to Us?

When clicking a link, you may Go to another web page Write an e-mail to an e-mail address Download a program Open a document

The link destination type decides the behaviours, while all the different links are in the same grammar in HTML

Page 4: CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

March 12, 2003 CPSC Labs by Jie Gao

Various Destinations

A web page or a web address http://www.ucalgary.ca intro.htm

An e-mail address mailto: [email protected]

A program or document http://www.ucalgary.ca/map/03CampusMap.pdf http://pages.cpsc.ucalgary.ca/~gaoj/TA/W03/Mar1

0.pps

Page 5: CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

March 12, 2003 CPSC Labs by Jie Gao

The <A> Tag

An <A> tag stands for a link in the web page source HTML

Grammar: <A href=“…”>……</A> <a href=“mailto: [email protected]”>Contact Me</a> <a href=“intro.htm”>Introduction here</a>

Page 6: CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

March 12, 2003 CPSC Labs by Jie Gao

Absolute and Relative Links

Absolute links: The absolute address of a file E:\documents\uc.gif http://www.ucalgary.ca/index.html

Relative links: Use the current web page as the reference uc.gif uc/intro.htm

Page 7: CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

March 12, 2003 CPSC Labs by Jie Gao

Absolute and Relative Links

When creating web pages Create relative links to the pages/images within

your web site Create absolute links to the pages/images outside

your web site

Page 8: CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

March 12, 2003 CPSC Labs by Jie Gao

The Links in Your Assignment

4 links within your web site You can use relative links to point to other pages Make sure every page can be visited by following

the links 2 links to other web sites

Use absolute links like “http://www.address.com/path/”

1 e-mail link “mailto: [email protected]

Page 9: CPSC 203 Introduction to Computers Lab 66 By Jie Gao.

March 12, 2003 CPSC Labs by Jie Gao

The Images in Your Assignment

At least 2 pictures in your web pages obtained legally from the Internet Pay attention to the copyright In the browser, right click on the picture and you

can find menu item to save it to your computer When inserting an image into your web page,

also use relative address to point to the image file (addresses like “c:\my documents\uc.gif” won’t work when later you publish your web pages)