27
Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal).

Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Embed Size (px)

Citation preview

Page 1: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Doing L I N K S

Links 1: Internal Links

Links to anchors on the current page (Internal).

Page 2: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Internal Links

• Links to anchors on the current page (Internal).

Page 3: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

• Links are the most fundamental part of the world wide web.

• It is the links that tie it all together

Page 4: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Different kinds of Links

• There are different kinds of links you can have on your website:

• Links on the current page (Internal).• Links to other pages within the

current site (Local)• Links to pages outside the current

site (Global).

Page 5: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Link Tags

•The tags used to produce links are

the <a> and </a>.

Page 6: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

LINK to a target

• .

• .

.

<A NAME=“POEM”><H3><P>My Poem about Roses></H3></P></A>

A Rose is a rose is a Rose

Page 7: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Anchor tags

• Everything between these two will work as a link.

<a> and </a>.

Page 8: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Starting links

• The S T A R T of the link

is added to the <a> tag using the href="http://www.whateverpage.com" setting.

This is where we are going to….

Page 9: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Start the Link

The target of the link is added to the <a> tag using

the href="http://www.whateverpage.com" setting.

Page 10: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Start the LinkThe example below shows how to make

the word here work as a link to yahoo.

Click <a href="http://www.yahoo.com">here</a> to go to yahoo.

Page 11: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

You simplify:

• Specify the START in the

<a href=" ">.

• Then add the text that should work as a link.

• Finally add an </a> tag to indicate where the link ends

Page 12: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Watch the COLOR of the text Links

• There are a few settings that can be useful for controlling the colors of text links.

Page 13: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

how to:

• Define colors for all links on the page.

• Define colors for individual links on the page

Page 14: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Define colors for all links on the page

• The general color of text links is specified in the <body> tag, like in the example below:

<body link="#C0C0C0" vlink="#808080" alink="#FF0000">

• ?

Page 15: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

• Link, alink, vlink

Page 16: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

LINK

• link - standard link - to a page the visitor hasn't been to yet. (standard color is blue - #0000FF).

Page 17: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

vlink

• vlink - visited link - to a page the visitor has been to before. (standard color is purple - #800080).

Page 18: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

alink

• alink - active link - the color of the link when the mouse is on it. (standard color is red - #FF0000).

Page 19: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Define colors for individual links on the page

• you might want some or links to have different colors than the rest of the page.

•There are 2 ways for doing this:

Page 20: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Individual links

• Placing font tags between the <a href> and the </a> tag.This method will work on all browsers …usually

• <a href><Font Color=red>Web </a>

Page 21: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Another way……

• Using a style setting inside the <a> tag. This method works on newer browsers.

•The first technique would look like this:Click <a href="http://www.yahoo.com"><font color="FF00CC">here</font></a> to go to yahoo.

Page 22: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Note:

•It is important that both the <font> and the </font> tags are between the • <a href> and </a> tags.

Page 23: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

The second technique would look like this:

Click <a href="http://www.yahoo.com" style="color: rgb(0,255,0)"> here </a> to go to yahoo.

Sets the style internally inside the <a>

Page 24: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

PROBLEM….

• Neither of these two techniques will work with every browser…. So COMBINE ‘em both…..

Page 25: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

This example will work on all browsers:

• This example will work on all browsers:Click

<a href="http://www.yahoo.com" style="color: rgb(0,255,0)">

<font color="FF00CC">here</font></a> to go to yahoo.

Page 26: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

Safe browsers

• The last example is interesting. Not only because it will work on all browsers. But even more because it shows a general approach to making

your pages browser safe.

Page 27: Doing L I N K S Links 1: Internal Links Links to anchors on the current page (Internal)

About browsers

• browsers simply leave out information that is not understood,

• you can work around browser differences by simply adding different settings for multiple browsers.