Lesson 11: Graphics


Return to Lesson 10

Continue on with Lesson 12


Pictures on the internet should be in either .jpg or .gif format. Graphics use the following tags: <IMG SRC="..."> <IMG> tells the computer that it is about to display a graphic image. <SRC="..."> is the source for the picture. Place the exact URL or file name for the picture that you want to display. For example: <IMG SRC="dogpic.jpg"> will display the image dogpic.jpg on the left side of the screen. You can control where the image is displayed on the screen by including an ALIGN=RIGHT, MIDDLE, or LEFT statement after the image statement. For example: <IMG SRC="dogpic.jpg" ALIGN=RIGHT> This will align the picture to the right side of the screen. I have also found that the <CENTER>...</CENTER> tag will center the images on the screen. For Example: <CENTER><IMG SRC="dogpic.jpg"></CENTER> Other possible alignments include: ALIGN=MIDDLE puts the middle of the picture in the middle of the current line ALIGN=RIGHT puts the image over against the right margin allows text on the left ALIGN=LEFT puts the image over against the left margin and allows text on the right. ALIGN=ABSBOTTOM aligns the bottom of the image with the current line. ALIGN=TOP Aligns the top of the image with the current line The images will load faster if you include information about the height and width of the picture in pixels. (This information can be found in most graphic programs.) HEIGHT=(number of pixels) WIDTH=(number of pixels) For example: <CENTER><IMG SRC="dogpic.jpg" HEIGHT=100 WIDTH=250> </CENTER> or <IMG SRC="dogpic.jpg" ALIGN=MIDDLE HEIGHT=100 WIDTH=250> Assignment 11 Add at least one picture to the webpage you created in assignment 10. end of lesson