Some cookies are necessary to make this site and our content available to you. Other Cookies enable us to analyse and measure audience and traffic to the site. Cookies are also used by us, advertisers, ad-tech providers and others to develop and serve ads that are more relevant to your interests. To consent to the use of Cookies and proceed to the site, click Accept below. If you wish to withdraw consent later you will find a link in the footer Cookie Choices. For more information: Privacy Policy.

Positioning the image:
You can also change where you want your image to be positioned on the page. The most frequently used positions for images are left, right and center. To make an image centered, type this before the image tag:
<div align="center">

Everything typed after this will be centered, so now you need to type your image tags. When you have finished your image tag and no longer want everything centered, you simply end the center tag, like so:
</div>

To make something aligned to the left or right, you use the same code, but you would replace the word "center" with "left" or "right."

Background Images:
You can also make an image display as a background image instead of just having a solid color. This works well with simple, light-colored images. It livens up the page, yet you can still read the text clearly. To display an image as the background, you need to type:
<body background="http://www.neopets.com/mypicture.gif">

This will now display your image in the background.

Go to Previous Lesson Go to Next Lesson