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

Prepare for the WDI General Assembly Assessment Test. Study using flashcards and multiple choice questions with hints and detailed explanations. Master your skills and boost your chances of success in the exam!

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.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy