Workshop


The workshop contains quiz questions and activities to help you solidify your understanding of the material covered. Try to answer all questions before looking at the "Answers" section that follows.

Quiz

1:

How would you give a web page a black background and make all text bright green?

2:

How would you make an image file named texture.jpg appear as a repeating tile behind the text and images on a web page with white text?

3:

If elephant.jpg is a JPEG image of an elephant standing in front of a solid white backdrop, how do you make the backdrop transparent so only the elephant shows on a web page?

Answers

A1:

Put the following at the beginning of the web page:

 <body style="background-color:black; color:lime"> 


The following would do exactly the same thing:

 <body style="background-color:#000000; color:#00FF00"> 


A2:

<body style="background-image:url(texture.jpg);color:white">

A3:

Open the image in Paint Shop Pro; right-click the white area; select Image, Palette, Set Palette Transparency; accept the reduction in colors if necessary; and elect to make the background color transparent. Touch up any off-white spots that didn't become transparent and then use File, Save As to save the image in the GIF 89a format. Optionally, you could crop out the elephant and paste it onto a new image with a transparent background, and then save it as a PNG image.




SAMS Teach Yourself HTML and CSS in 24 Hours
Sams Teach Yourself HTML and CSS in 24 Hours (7th Edition)
ISBN: 0672328410
EAN: 2147483647
Year: 2005
Pages: 345

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net