O'Reilly logo

Beginning Web Programming with HTML, XHTML, and CSS, Second Edition by Jon Duckett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Images and Objects

In this chapter, you begin learning some aspects of web design that will really breathe life into your web pages. You start by learning how to add images into your documents using the <img> element. You will see the difference between some of the main formats used for images on the Web and learn how to prepare your images for use on the Web. You will also learn how to make an image a link, and even how to divide an image up into sections so that different parts of the image link to different pages—this is known as an image map.

Then you will go on to meet the <object> element that you can use to insert all manner of objects into pages, from MP3s and Flash movies to Active X controls and even images.

Adding Images to Your Site

Images and graphics can really bring your site to life. In this section you will not only learn how to insert images and graphics into your pages, but also the different image formats you can use on the Web (such as GIFs, JPEGs, and PNGs). You will also learn when you should choose which format.

You will see how careful you have to be when using images on the Web because if you don't prepare images correctly, they can really slow down the speed it takes for a page to load—and slow sites frustrate users. Furthermore, because you will probably be writing your first sites on your desktop/laptop computer, you might not realize how long a page will take to load until it is actually on the Web. So choosing the right format for your images ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required