HTML Course

 

Page 9 : Images & Anchors

  • Making Links Using Text Or Images
  • These tags are called anchors. Text or images can be used as anchors. An anchor will make the text or image clickable to another page on the internet. These are called links.

    Anchors Open With:

    &ltA HREF="...">

    Anchors Close With:

    </A>

    Here is a sample code for text as an anchor:

    <A HREF="http://www.draac.com">
    Click Here For Draac.Com</A>

    Here is a sample code for image as an anchor. Note: Use the border="0" tag to prevent the image link from having a "hightlight box" around it when viewed with a computer.

    <A HREF="http://www.aruba.com">
    <IMG SRC="aruba.jpg" WIDTH="?" HEIGHT="?" BORDER="0"></A>

    To make an internal link to one of your files. To create a home or back or next button to one of your other Web Pages. Lets call your second page index2.html. This is a sample code of how to do that.

    <A HREF="index2.html">On To Next Page</A>

    An image may also be used for an internal link.

  • Thumbnail Image Anchors
  • This is a sample of a clickable image to an image. What is known as a thumbnail image. The resized smaller image will show the full sized version when clicked on. You may want to resize the image on your computer with the proper software and upload the smaller image for a faster loading thumbnail. Click on this thumbnail to see the results. Use your back button to return here.

    Here is the thumbnail code used:

    <A HREF="aruba.jpg">
    <IMG SRC="aruba.jpg" HEIGHT="50" WIDTH="65" BORDER="0">
    </A>

    If you would like just text to click to an image, use this code:

    <A HREF="aruba.jpg">
    Click For Aruba Photo</A>


  • Sound Anchors
  • You can also use anchors to click to sounds. Upload this Sound (sample.mid) to your files. We will be using this in some sample codes. To make text or an image clickable to a sound try these codes here, with the sound provided above. Here is some text as a sound anchor:

    <A HREF="sample.mid">
    Click Here For Sample Sound</A>

    Here is an image as a sound anchor:

    <A HREF="sample.mid">
    <IMG SRC="aruba.jpg" WIDTH="?" HEIGHT="?" BORDER="0"></A>