<A>tag with an
HREFattribute specifying the destination. Here all you need for the destination is the file name.
<A HREF="anotherpage.html">Here is another page</A>
HREFattribute. If linking to another site, you must use the entire URL, including the "http://" part, or the link may not work. For example, if you want to link to Lamont's Cel Gallery, which has the URL www.twinplanets.com/cels/index.html, you would use this code:
<A HREF="http://www.twinplanets.com/cels/index.html">Go to Lamont's Cel Gallery!</A>
NOTE: If a URL does not end with an actual filename, the server will look for a file
<A HREF="policies/summary.html">Summary of policies</A>
<A HREF="../index.html">Main home page</A>
../for each subdirectory level you're jumping up through.
www.twinplanets.comand you want to link to the page
www.twinplanets.com/cels/gallery_misc.htmlyou would use the code:
<A HREF="/cels/gallery_misc.html">Miscellaneous animation cels</A>
</A>tags. You can also place an
<IMG>tag there instead, in which case the graphic you've inserted becomes a hot link in its own right. This is how live buttons, etc. are inserted into Web pages.
</BODY>tags and insert the text you copied to the clipboard by pressing <CTRL><V>. Add a title between the
</TITLE>tags that reads:
Links of all kinds. Save your file under any name you choose (but be sure that you give it an
.htmlextension), load it into your browser, and view it.
<BR>tags after each paragraph, to get rid of that "run-on" look. Next, let's add a few links. Locate the words "Twinplanets Home Page" at the end of the first paragraph, and let's make it into a link:
http://in the actual link even if you don't show it to the user; otherwise the link will not work.
HREFattribute and see if the link still works.
<IMG SRC="star3.gif" ALIGN="LEFT">
ALIGN="LEFT"attribute, this causes the text to "wrap around" the graphic as well as keeping it to the left. Try leaving out this atttribute and see what happens).
<IMG>tag, add the tag
<IMG>tag, add the ending tag
<IMG>tag, so that it now looks like this:
<IMG SRC="star3.gif" ALIGN="LEFT" BORDER="0">
BORDERattribute specifies how thick (in pixels) the border should be. The default is one pixel, so if that's what you want just leave it out.
</A>tags. For example, at the end of the next paragraph of text (ending with the words "it will work, like this:") add this code:
<A HREF="http://www.nasa.gov/"><IMG SRC="star4.gif" BORDER="0">
<BR>Welcome to NASA</A>
|Terms to know from this lesson|
|Absolute addressing: Specifying the entire URL of a link.|
|Relative addressing: Specifying a link destination in terms of its relative position to the page with your link.|
This page last updated 2/5/2010.|