-
In an image element, why is the alt attribute important?
The alt attribute provides a text description of the image which describes the image if you cannot see it.
-
What determines if an image element is inline or block?
Block elements always appear on a new line.
Inline elements sit within a block level element and do not start on a new line.
-
What are the benefits of jpg or png image file formats?
PNG supports lossless compression. It is a good choice for storing line drawings, text, and iconic graphics at a small file size.
the JPEG format is great for color and photographs. It has a lossy compression ratio which makes it sometimes a better format to use with photographs due to the ability to compress the file more.
-
What is the benefit of specifying the height and width of images in CSS compared to specifying in the HTML?
Specifying image sizes helps pages to load more smoothly because the HTML and CSS code will often load before the images, and telling the browser how much space to leave for an image allows it to render the rest of the page without waiting for the image to download.
-
What is an image sprite, and why is it useful?
When a single image is used for several different parts of an interface, it is known as a sprite.
The advantage of using sprites is that the web browser only needs to request one image rather than many images, which can make the web page load faster.
- Add a couple relevant images to your paragraph text.