Images on a Web Page

 

 

 

Images for a web page must be saved in one of the following formats: .jpg .gif .png

<img src =”MyPic.jpg” align=left> Places an image on the left side of a page.
<img src = "MyPic.jpg" alt ="A snapshot of my dog."> Adds a message when the mouse moves over the graphic.
<img src =”MyPic.jpg” width=100 height=150> width and height expressed as pixels
<img src =”MyPic.jpg” hspace=8>  Horizontal space between the picture and the next element on the page
<img src =”MyPic.jpg” vspace=10> Vertical space between the picture and element below the image
<img src =”MyPic.jpg” border=0> Width of the border surrounding the picture. 

Examples:
   <img src = “MyPic.jpg” align = left>

                     <img src = “MyPic.gif” alt=”Picture of me” align= right>

                     <img src = “MyPic.gif” vspace = 10 hspace = 8 align = left>

 

 

Images as a hyperlink:


Suppose you want to have your image be a hyperlink.


Here is the code:

<a href = "Chap2Quiz.html"><img src = "MyIcon.gif" border=0></a>

You probably have put all of your images into a folder. If the Images folder is located inside of the current folder your path is:

<a href = "Chap2Quiz.html"><img src = "Images/MyIcon.gif" border=0></a>  

If the Images folder is on the same level as the current folder, you must first get yourself out of the current folder before you look into another folder:  

<a href = "Chap2Quiz.html"><img src = "../Images/MyIcon.gif" border=0></a>