Web Design EOPA Practice Test

Session length

1 / 20

Which attributes are included in the sample image tag?

src, alt, width, and height attributes

In HTML, the image tag displays graphics and relies on attributes to define what to show and how large to display it. The essential attribute is src, which points to the image file. The alt attribute provides a text alternative for accessibility and for users who can’t load the image. Width and height are optional attributes that control the displayed size of the image. So a sample image tag typically includes all four: src to locate the image, alt to describe it, and width and height to set its dimensions. The other choices go astray because href belongs to links (not the image tag), and while a title attribute exists, it isn’t a substitute for alt and isn’t required in this context; also some options omit src, which is essential for an image tag, or include href by mistake.

href, alt, width attributes

src, title, height attributes

src and href attributes

Next Question
Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy