This is my reading notes for Code Fellows.
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.
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 |
If you are building a site from scratch, it is good practice to create a folder for all of the images the site uses.
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.
Foreground Color
These express colors in terms of how much red, green and blue are used to make it up. For example: rgb(100,100,90)
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
There are 147 predefined color names that are recognized by browsers. For example: DarkCyan
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).
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 transparency or for images with text & objects with sharp contrast edges like logos.
Use GIF format for images that contain animations.