|
HTML - Links |
tutorial by Chris |
Now that you have text wedged it your cerebrum, or something like that, its time to make
them do something, what a great time to start links. Your links tag isnt really a LINK
tag, its an A tag. It does more than just link but ill explain later. Now for links, lets
start with a basic tag, this lesson if very short but involves more than most tags so far
in order to work correctly. Scope this...
Links Page
Links Page
Thats it^ above , thats a link tag. Very short and simple. Lets spekyulate it...
the A tag is what starts it off to let it know whats coming. You ask why does a link have
A AND the HREF part? well, theres more to an A tag than just a link.
The HREF="links.html" part is where you put your page url and the Links Page is where you
put the title of the link. That way you dont have a have a huge url just to link to pages.
Simple huh? now lets make it open in a new window...
Links Page
Links Page
Displays that^ - notice the new addition of target="new" , thats also an attribute of the A
tag. It tells what frame to open the page in. (if you use frames and call a frame name="new"
then the links page would open in that frame window.
But since we dont use frames called new the browser opens the link in a new window.
Theres one more thing about the A tag that really rocks. Say you have a page with a lot of
similar short information on, and you dont want to put them all on seperate pages. We can
use the name="whatever" attribute. Dont be confused, above i just sayed if u named a frame
something with name="whatever" it would call the FRAME that name. Well now you can just
name certain parts of the page so it can go to the exact part on the page. confusing?
i know you have seen links that say top and they take you to the top of the page right?
Heres how they do it....
HEADING FOR MY PAGE
that names - HEADING FOR MY PAGE - heading, so now that its named i want a link to
take me to the HEADING part of my page (like the top of your page) so ill show you how to
link to certain parts of pages..
Go to Heading (Top)
that will make the link go to page "pagename" and go to the part specified as "heading"
Now lets try linking and making it work, i used the a name="" tag to call a
section of my page HEADING, now im gonna link to it and see if this link doesnt bring you
up the page a bit..., scroll down to the link and see if it doesnt bring you back up the
part where i show you how to make the name attribute work...
Go to Heading
Whoa thats cool, click here to go to the top of my page Top :)
to just go to the top of ur page u can simply link to #, like ... <a href="#" ....
You can notice in the status bar how they are linked
Ok one LAST thing, kinda a review...
Lets make a link bold, green, and size 5!!!! Try to guess how to make this:
Links
Links
Just requires some space-between-the-ears-power
Next lesson is Images
|
|
|
|