Skip to the content.

Code 201 Class 5 Reading Notes

Images

To add an image into the page you need to use an <img> element. This is an empty element (which means there is no slocing tag). It must carry the following two attributes:

You can adjust the height and width of images by specifying how man pixels on each setting.

An image can be placed:

1) before a paragraph

2) Inside the start of a paragraph

3) I the middle of a paragraph

4) Align to the left of a paragraph

5) Align to the right of the paragraph

You Should save images at the size you will be using them on the web page and in the appropriate format.

Color

CSS3: HSL Colors

CSS3 introduces an entirely new and intuitive way to specify colors usin hur, saturation, and lightness values

Hue - Is the colloquial idea of color. In HSL Colors, hue is often represented as a color circle where the angle represents the color, although it may also be shown as a slided with values from 0 too 360. Saturation - is the amount of gray in a color. Saturation is represented as a percentage. 100% is full saturation and 0% is a shade of gray. Lightness - Is the amount of white (lightness) or black (darkness) in a color Lightness is represented as a percentage. 0% lightness is black, 100% lightness is white, and 50% lightness is norma. Lightness is sometimes referred to as luminosity.

Font

Responding to Users:

USE JPEG format for all images that contain a natural scene or photograph where variation in colour and intensity is smooth. Use PNG format for any image that needs trasnparency or for images with text & objects with sharp contrast edges like logos. Use GIF format for images that contatain animations.

<—BACK