Skip to content

Instantly share code, notes, and snippets.

@davidbecker6081
Last active April 28, 2017 15:42
Show Gist options
  • Save davidbecker6081/eedeebfcbf906feacc261cff2f37d66a to your computer and use it in GitHub Desktop.
Save davidbecker6081/eedeebfcbf906feacc261cff2f37d66a to your computer and use it in GitHub Desktop.
Prework Day 4 - David Becker

#Prework Day 4 Chapter 5

  1. 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
  1. 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
  1. 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

  1. 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)
  1. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment