Skip to main content

Section 21.2 A Library of Images

The images we work with in this book must be built into the webpage - you can’t use an image from your own computer. Below are some images that are built into the web pages in this chapter.
(a) mount_hood.jpg
(b) graduates.jpg
(c) goalkeeper.jpg
(d) green_screen.jpg
(e) cat.jpg
(f) student1.jpg
(g) student2.jpg
(h) scooter.jpg
(i) logo.jpg
Figure 21.2.1. Images available in this book
To use a particular image, change the line of code that creates an image object so that it specifies the desired image name in quotes. Like img = Image("student1.jpg") to use student1.jpg. Try out one or more of these images by changing line 4 in the program below.

Note 21.2.2.

It is also possible to use an image that is on another web page if you know its full address. Doing this would look like:
img = Image("")
You have attempted of activities on this page.