O'Reilly logo

Web Programming with HTML5, CSS, and JavaScript by Dean

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

6.9 Bitmap Image Formats: GIF, JPEG, PNG

So far, you’ve seen examples where if the user clicks a link, the browser opens a new page. It’s also possible to create a link where if the user clicks it, the browser opens an image. Usually, “opening an image” causes the image to fill the entire browser window. Normally, that’s inappropriate, but as you’ll learn in the next chapter, you can use an iframe element to create a window “frame,” which allows you to open/display an image within just the frame part of the window. But before we talk about the iframe element in the next chapter, first we need to talk about image file formats and img element details. That will take a while, and the rest of this chapter is devoted to that.

There are two basic ...

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