|
Reminder |
| Remember to book mark
this site! |
|
HTML stands for HyperText Markup Language
Part 4: Images and Backgrounds
- RECAP
While working with text is important, and color adds some character to a
page, what makes a page exciting is images. Here we will learn how to put
images into our page.
From Part 3. Your code so far from
Part 3 should look like
the following:
- IMAGES
Let's talk about images. When you use an image, basically you are linking
to it. It is wise to upload the image to your site. If an image is
uploaded to your web site, you do not have to link the entire web address,
only the picture name. For our purposes, we will use some images on this
site.
The tag to add an image is the IMAGE tag, <img>. We have to tell them
where the image is, so we use the src attribute to specify the image. We
do that like this:
<img src="../waterimage.jpg">
This link specifies the image on our server by using the exact url of the
image.
Let's put this in our page
Save your notepad as your HTML and Open your page in your browser to see
your picture.
- BACKGROUNDS
We Can also use images as backgrounds. This is an attribute of the BODY
tag. The good thing about background images is that they automatically
tile.
To use an image as a background image, we put it in our body tag. Change
your current body tag to this:
<body background="../waterimage.jpg">
Your html code should now look like this
Save as HTML and view your page!
When you are done we can go on to
lesson 5
Image attributes
|
"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2026 All Rights Reserved
Privacy
and Legal
|
|
 |