WDI General Assembly Assessment Practice Exam – Prep & Study Guide

Session length

1 / 20

What does the 'src' attribute in an <img> tag specify?

The location of the image file

The alternative text for an image

The URL of the image source

The 'src' attribute in an `<img>` tag specifies the URL of the image source. This attribute tells the browser where to find the image file that should be displayed on the webpage. It can be a relative path or an absolute URL, and it directly links to the image content that you want to show. By defining the source of the image in this way, you enable the browser to retrieve and render the image for users to see.

While the other answer choices are related to `<img>` tags, they do not correctly define the purpose of the 'src' attribute. The alternative text is specified using the 'alt' attribute, and image size can be controlled with the 'width' and 'height' attributes or through CSS styling. The 'location of the image file' could be a vague descriptor and doesn't capture the specificity of what the 'src' attribute conveys.

Get further explanation with Examzify DeepDiveBeta

The size of the image displayed

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy