ipl Learning HTML

Graphics and Images

Want to spice up your web page with some graphics and images? All you need is the image tag, <img>, and the source attribute, src, and a filename for the value. For example, I have an image of a goldfish bowl on on my computer’s hard drive in the same folder with my HTML documents. And, I want to tell the web browser to"put the picture of the goldfish bowl on the web page right here, right now."This is how I would do it:

<html>
<head>
<title>Learning HTML</title>
</head>
<body>
<img src="GoldfishBowl.gif" />
</body>
</html>

Want to make the image bigger? All you have to do is specify a width and height attribute, as well as a value for each:

<html>
<head>
<title>Learning HTML</title>
</head>
<body>
<img src="GoldfishBowl.gif" width="75" height="75" />
</body>
</html>

Want to center the image on the web page? Just add a pair of center tags:

<html>
<head>
<title>Learning HTML</title>
</head>
<body>
<center><img src="GoldfishBowl.gif" /> </center>
</body>
</html>

Pretty cool, huh?

There are tons of places to find images and graphics for your page.

When you do find something that you want to include on your page — whether images, graphics, or even text — you need to make sure that it is not copyrighted. To better understand, let me explain some more about copyright… right arrow


This resource originally created by Deborah Dunk.
Revised and edited by Michael Galloway in 2005 & in 2006.