Which element is used for an image in HTML?

Enhance your HTML skills with our HTML Tags Test. Challenge your expertise through interactive flashcards and multiple-choice questions. Each question includes hints and thorough explanations. Prepare effectively for your HTML examination!

The <img> element is the correct choice for displaying images in HTML. This element is a self-closing tag that can be used to embed images in a webpage. It requires the src attribute, which specifies the path to the image file, and typically includes an alt attribute for providing alternative text that describes the image, which is essential for accessibility purposes.

The other options do not serve as valid HTML tags for images. The <picture> element is used to provide multiple sources for the same image, allowing for responsive design depending on different media conditions, but it still requires an <img> element or <source> tags within it to display actual images. The <photo> and <image> tags are not recognized HTML elements and therefore would not produce any image display functionality in a browser.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy