HTML and CSS Certification Practice Test 2025 - Free HTML and CSS Practice Questions and Study Guide

Question: 1 / 400

What is the correct syntax for displaying an HTML5 logo with alternative text loading?

img src="html5.gif" alt="HTML5 Icon"

The correct syntax for displaying an HTML5 logo with alternative text is structured properly in the first choice. In HTML, the `<img>` tag is specifically used to embed images in a webpage. The `src` attribute defines the path to the image file, in this case, "html5.gif", while the `alt` attribute provides alternative text, which describes the image for accessibility purposes or in scenarios where the image cannot be displayed.

This choice correctly uses the `<img>` tag followed by the two necessary attributes: `src` for the source of the image and `alt` for the alternative text. Properly using these elements ensures that the image is displayed correctly while also improving accessibility and SEO.

Other options either misname the tag or do not follow the proper syntax for how to structure the attributes in an HTML tag. For instance, using "image" instead of "img" is incorrect since "image" is not a valid HTML tag. Additionally, while some of the syntactical arrangements may seem plausible, they do not reflect the established conventions of HTML, leading to potential rendering issues in a browser.

Get further explanation with Examzify DeepDiveBeta

image src="html5.gif" alt="HTML5 Icon"

img alt="HTML5 Icon" src="html5.gif"

img src="html5.gif" alt="HTML5 Logo"

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy