Images.

This is my reading notes for Code Fellows.

Images.

There are many reasons why you might want to add an image to a web page: you might want to include a logo, photograph, illustration, diagram, or chart.

Selecting an image.

Image Should be Stock Photos
Be relevant  
Convey information www.istockphoto.com
Convey the right mood www.gettyimages.com
Be instantly recognisable www.veer.com
Fit the color palette www.sxc.hu

Storing Images on your site.

If you are building a site from scratch, it is good practice to create a folder for all of the images the site uses.

Adding Images.

Associated tag’s.

<img> - Self closing tag

src - assigns a source/link to an image.

alt - used for accesability so a text reader can be used on the website.

Color

Foreground Color

RGB values

These express colors in terms of how much red, green and blue are used to make it up. For example: rgb(100,100,90)

Hex codes

These are six-digit codes that represent the amount of red, green and blue in a color, preceded by a pound or hash # sign. For example: #ee3e80

Color names

There are 147 predefined color names that are recognized by browsers. For example: DarkCyan

Background Color

CSS treats each HTML element as if it appears in a box, and the background-color property sets the color of the background for that box.

You can specify your choice of background color in the same three ways you can specify foreground colors: RGB values, hex codes, and color names (covered on the next page).

JPEG vs PNG vs GIF

TL;DR

Use JPEG format for all images that contain a natural scene or photograph where variation in colour and intensity is smooth.

PNG

Use PNG format for any image that needs transparency or for images with text & objects with sharp contrast edges like logos.

Gif

Use GIF format for images that contain animations.

Home