ࡱ >
` bjbj L ! P P P P x x x T T T 8 $ ; h ( ( ( ( }; ; ; ; ; ; ; $ f= h ? t ; x ( ' ( ( ( ; P P ; + + + ( P x }; + ( }; + + n *5 $ T x I9 8FB T ) 8 I; 4 ; 0 ; 8 h B@ K* B@ @ I9 I9 B@ x E: ( ( + ( ( ( ( ( ; ; K+ ^ ( ( ( ; ( ( ( ( $
P P P P P P Basic Web Page Graphics
JPEG and GIF are the most common graphics formats on the Web.
JPEG is better suited for high-resolution photographs and complex graphics.
JPEG stands for Joint Photographic Experts Group
Allows you to use all 16.7 million colors
Amount of compression can be varied, but it is lossy compression image details are lost
GIF is better suited for line drawings and simple graphics.
GIF stands for Graphics Interchange Format
No loss of quality, and there is no way to control the degree of compression
Limited to 256 colors
The IMG HTML element creates an inline image:
An inline image is an image that is treated like a single alphanumeric character.
Use the ALT attribute in the IMG tag to describe graphic elements for users who cannot see graphics.
The align attribute controls the vertical alignment of the graphic:
Text will wrap around a left- or right-aligned image
will go to the next line below the image
There is an error on page 182 in the book: there is no tag in HTML
Adding the Height and Width attributes to the IMG tag will make graphics display faster on your Web page.
The Height and Width tags can also be used to scale an image.
A transparent GIF looks as if it were drawn on the background of the Web page.
Colors
There are 16,777,216 =2563 possible colors that can be used on Web pages.
Red brightness from 0 to 255
Green brightness from 0 to 255
Blue brightness from 0 to 255
Web-safe colors are 216=63 colors that can be faithfully reproduced on any computer monitor regardless of the operating system used.
Red = 0, 51, 102, 153, 204, or 255
Green = 0, 51, 102, 153, 204, or 255
Blue = 0, 51, 102, 153, 204, or 255
Web pages use hexadecimal (base 16) codes to describe colors.
Black = #000000
White = #FFFFFF
Red = #FF0000
Green = #00FF00
Blue = #0000FF
The bgcolor attribute of the Body tag sets the background color of the Web page.
A color palette is a collection of colors.
8-bit and 24-bit color describe the size of the affiliated color palette.
An 8 bit palette contains 256 colors
A 24 bit palette contains 16,777,216 colors
JPEG images use 24-bit color (True Color)
GIF images use 8-bit color
Background Images
You can use any JPEG or GIF file as a background for a Web page.
The browser will place the image in the upper-left corner and will tile it left to right.
For example,