Images and Video Worksheet

Problem 1

Find an image and copy it to the 'images' folder that was included in your starter files for this course (the starter files were all put in a folder named 'web-programming'). Then add an IMG element below that displays the image. Make sure to set the alt attribute, and you may set the width attribute if you like.

An Angry Dog
Problem 2

Why is it important to use small file sizes for images (image files that are small in kilobytes)?

Faster Page Load Times Large images slow down page rendering, frustrating users and increasing bounce rates. Better SEO Search engines prioritize fast-loading websites, improving rankings.
Problem 3

If you want an image to have a transparent background, what type of image should it be (what file extension would you use)?

If you want an image to have a transparent background in HTML, you should use a PNG file (.png). The PNG format supports transparency, allowing the background to remain clear rather than solid white or another color.
Problem 4

What are responsive images?

It goes along with responsive web design, so like adding the width attribute to an image and making it a percent will make it a responsive image.
Problem 5

Find another image and copy it to the 'images' folder. Then add an IMG element below that displays the image. Make sure to set the width and alt attributes. Turn the image into a link by nesting it within an A element. Clicking on the image should open up google.com in a new browser tab.

A bald eagle
Problem 6

Find a video on YouTube that you like, and embed it into this page.