#Prework Day 4 Chapter 5
- In an image element, why is the alt attribute important?
- the alt attribute provides a description for the image for search engine optimization or people that are visually impaired
- What determines if an image element is inline or block?
- where the image is placed in your code/ if the image is placed inside another block element, it will become an inline element
- What are the benefits of jpg or png image file formats?
- JPEG - used when you have numerous colors in a picture (normally regular photos) / PNG - used mainly for logos, illustrations, and diagrams that have flat colors
Chapter 16
- What is the benefit of specifying the height and width of images in CSS compared to specifying in the HTML?
- it helps the pages load more smoothly and we can specify size of multiple images at once, DRY method (keeps things easier to read and fix)
- What is an image sprite, and why is it useful?
- An Image Sprite is when a single image is used for several different parts of an interface / the benefit is that the web browser only needs to request one image instead of multiples, making the page load faster