|
Drifting Designs Tutorials > > Coding > > HTML > > Links
Basic Link
New Browser Window Link
Titled Link
E-mail Link
Image Link
Hyperlinks, or links for short, are used to link one page to another. For example, to arrive at this page, you had to click
on a text link that sent you to this page.
Basic Link
The code for a basic link is:
<a href="http://www.yourpage.com">Link</a>
Explanation: "A href" tells and directs the browser that this is a link.
"www.yourpage.com" is the place you will be sent to once the link is clicked on. "Link" is the text link. When using this
code, replace "http://www.yourpage.com" with the webpage url you want the link to lead to, and replace "Link" with whatever you want.
For example, the code below =
<a href="http://www.d-designs.skyefairy.net">Link</a>
would produce this as a result
Link
New Browser Window Link
If you've clicked on the link, you'll have seen that it led to the DriftingDesigns homepage in the same browser window. However,
try clicking on the link below.
Link
See how it opened up to a new browser window? To make your links be able to do that, simply add
target="_blank"
So that the code is now -
<a href="http://www.d-designs.skyefairy.net" target="_blank">Drifting Designs</a>
Titled Link
Here's another effect. Hover over the link below -
Drifting Designs
You see a tiny yellow box showing up reading "Index" when you hover the mouse over hte text. To add that effect, add the code -
title="Index"
so that the code is now -
<a href="http://www.d-designs.skyefairy.net" target="_blank" title="Index">Drifting Designs</a>
Of course, you may replace the word Index with whatever you want.
E-mail Link
You can also use links for e-mail. The link below is an example of one.
E-mail Drifting Designs!
The code is:
<a href="mailto:someone@something.com?subject="Hello">E-mail me</a>
Replace "someone@something.com" with an e-mail address, and replace "Hello" with whatever you want the subject of the e-mail to be.
Replace "E-mail me" with whatever you want.
Image Link
Can images be used as links? Absolutely! The code is -
<a href="http://urlofyourpage.html"><img src="urlofyourimage.gif"></a>
Replace "http://urlofyourpage.html" with the url of the page the link should lead to, and replace "urlofyourimage.gif" with
the url of the image.
|
Hosted by:
|
|
|