|
IMPORTANT! Read 9 - SOURCE before trying LINKS for the first time!
Links = <a href=" "></a>
"a" stands for anchor or the point to which a link is anchored to. "href" stands for Hypertext Refernce, which is the address/source of the file oe website that the link must follow to reach the anchor point. The opening tag puts the two together to tell the browser what type of action it must perform and where to look for the source of that action.
There are many way to link to different types of files over the internet.
Here are the ones you will be using the most:
<a href="http://">link</a> - links to another web site.
<a href="#">link</a> - # is used to create a blank or empty link. Using a hash (#) is great for when you are building a page and aren't ready to put in the addresses for the links.
<a href="https://">link</a> - the "s" stands for "secure" - so this links to a site running secure information transfer protocals.
<a href="mailto:">link</a> - will open a compose email window with the link in the address To: box.
<a href="file://">link</a> - will look for a file on your computer's hard drive.
<a href="ftp://">link</a> - Will connect to an FTP site which will iniate the download of a requested file.
Let's show you some examples of how real anchors work.
| Example |
|
Code |
| My Favourite Sports |
|
<a href="sports.html">My Favourite Sports</a> |
| My Cat * |
|
<a href="cat.gif">My Cat</a> * |
| Download My Story |
|
<a href="story.doc">Download My Story</a> |
| Email Jet |
|
<a href="mailto:jet@html4kids.net">Email Jet</a> |
 |
|
<a href="link.html"><img src="images/cat.jpg" border="0" alt="This is a picture"></a> |
* As you can see, when you look at an image file alone, it opens a new window and shows the image. This does not give you a lot of control as to how the image looks
TARGET="..."--Tells the link to be loaded into one of the following values:
- "_blank"--Loads the link into a new blank window.
- "_parent"--Loads the link into the immediate parent of the document the link is in.
- "_self"--Loads the link into the same window. (default)
- "_top"--Loads the link into the full body of the current window.
- "_name"--Matches the link to a specific palce on the page in the same window.
code:
<a href="#" target="_top">Go to top of the window/page</a>
exmaple:
Go to top of the window/page
|