An image is hosted at https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg. Which of the following is the proper HTML code to display this image on your webpage?

Study for the CodeHS Web Design (Picasso) Test. Prepare with flashcards and interactive multiple choice questions, each question supported by hints and explanations. Ace your exam!

The correct HTML code to display an image is formatted as <img src="URL">. In this case, the <img> tag is specifically designed to embed images in a webpage. Using src is essential because it tells the browser where to find the image by providing the URL.

The syntax in option C accurately represents this format: <img src="https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg">. This tells the browser to load and display the image located at the given URL.

The other options do not follow the correct syntax for including an image in HTML. The image tag does not exist in standard HTML, the href attribute is used for links rather than images, and the <picture> tag, while it can be used for responsive images, does not accept src directly in the way shown. Instead, it requires nested <source> elements for each image version, which is more complex than simply referencing an image with the <img> tag. Therefore, option C is the only one that uses the correct structure and attributes for displaying an image.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy