Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Workshop 239

9


Q What about images that are partially transparent so that they are able to dis-
play the page background? They look like they sort of float on the page. How
do I create those?

A This is another task you can accomplish with an image-editing program. Both GIF
and PNG support transparency. Most image-editing programs provide the capability
to create these types of images.
Q Can I put HTML tags in the string for the alt attribute?


A That would be nice, wouldn’t it? Unfortunately, you can’t. All you can do is put an
ordinary string in there. Keep it simple, and you should be fine.


Quiz



  1. What’s the most important attribute of the tag? What does it do?

  2. If you see a funny-looking icon rather than an image when you view your page, the
    image isn’t loading. What are some of the reasons this could happen?

  3. Why is it important to use the alt attribute to display a text alternative to an
    image? When is it most important to do so?

  4. What is an imagemap?

  5. Why is it a good idea to also provide text versions of links that you create on an
    imagemap?

  6. True or false: When you use the background shorthand property, the order of the
    values is important.


Quiz Answers



  1. The most important attribute of the tag is the src attribute. It indicates the
    filename or URL of the image you want to include on your page.

  2. Several things might cause an image not to load: The URL may be incorrect, the
    filename might not be correct (they’re case sensitive), it might have the wrong file
    extension, it might be the wrong type of file, or you might have forgotten to load
    the image to the web server.

  3. It’s a good idea to provide text alternatives with images because some people use
    text-only browsers or have their graphics turned off. It’s especially important to
    provide text alternatives for images used as links.

  4. An imagemap is a special image in which different areas point to different locations
    on the Web.

Free download pdf