html images links and lists: 18 MCQs with answers

All 18 multiple-choice questions from this kit, free and with no sign-up.

Warm-up · 7 questions

Q1. Which tag is used to embed an image on a webpage?

Beginner
A `<picture>` B `<src>` C `<img>` D `<image>`
Show answer & explanation

`<img>`

The `` tag embeds an image file into the page. `` and `` are not the correct tags for this job.

Q2. Which attribute of `<img>` gives the path or URL of the image file?

Beginner
A `href` B `link` C `src` D `alt`
Show answer & explanation

`src`

`src` (source) tells the browser where the image lives. `href` belongs to the anchor tag, not ``.

Q3. Which tag creates a hyperlink?

Beginner
A `<href>` B `<link>` C `<a>` D `<url>`
Show answer & explanation

`<a>`

The `` tag, called the anchor tag, creates a hyperlink. Its destination is set by the `href` attribute.

Q4. Which tag creates a bulleted list?

Beginner
A `<li>` B `<ul>` C `<bl>` D `<ol>`
Show answer & explanation

`<ul>`

`` creates an unordered (bulleted) list. `` creates a numbered list and `` wraps a single item.

Q5. A student writes `<img src="cat.jpg">` and the image loads, but a blind user cannot tell what it shows. Which attribute is missing?

Beginner
A `width` B `alt` C `href` D `height`
Show answer & explanation

`alt`

The `alt` attribute provides the text description that screen readers announce. Without it the image is inaccessible.

Q6. Which tag wraps a single item inside a list?

Beginner
A `<li>` B `<item>` C `<ol>` D `<ul>`
Show answer & explanation

`<li>`

Each list item is wrapped in `` (list item) tags, whether the list is `` or ``.

Q7. The `<img>` tag is a void element — it has no closing tag and relies on attributes like `src` and `alt`.

Beginner
A True B False
Show answer & explanation

True

The `` tag is a void element — it has no closing tag and relies on attributes like `src` and `alt`.

Building up · 6 questions

Q8. A recipe page lists steps that must be followed in order. Which list type fits best?

Intermediate
A `<li>`, because it numbers items B `<ul>`, because bullets are clearer C `<img>`, because steps are visual D `<ol>`, because sequence matters
Show answer & explanation

`<ol>`, because sequence matters

`` creates an ordered (numbered) list, which is right when the order of items matters, like recipe steps.

Q9. Which `href` value would jump to a section with `id="contact"` on the same page?

Intermediate
A `#contact` B `contact.html` C `https://contact` D `mailto:contact`
Show answer & explanation

`#contact`

An anchor link uses `#id` to jump to a section on the same page. `contact.html` would load a different page.

Q10. Which `href` value opens the user's mail client?

Intermediate
A `email:hi@site.com` B `https://hi@site.com` C `#hi@site.com` D `mailto:hi@site.com`
Show answer & explanation

`mailto:hi@site.com`

Email links use `mailto:` inside `href` to open the mail client. The other prefixes do not trigger that behaviour.

Q11. How do you turn an image into a clickable link?

Intermediate
A Add an `href` attribute to the `<img>` tag B Add a `link` attribute to the `<img>` tag C Wrap the `<img>` inside an `<a>` tag D Wrap the `<a>` inside an `<img>` tag
Show answer & explanation

Wrap the `<img>` inside an `<a>` tag

Placing the `` inside `` makes the image the click target. `` has no `href` attribute of its own.

Q12. A page has a menu built as `<ul>` containing `<a>` tags. What does the `<ul>` contribute here?

Intermediate
A It supplies the destination addresses B It loads the images used in the menu C It gives the menu list structure D It makes each link open in a new tab
Show answer & explanation

It gives the menu list structure

The list provides structure, the anchor provides the click target, and the image provides the visual. Destinations come from `href`.

Q13. Which pair of attributes on `<img>` is effectively mandatory for a working, accessible image?

Intermediate
A `href` and `alt` B `src` and `href` C `width` and `height` D `src` and `alt`
Show answer & explanation

`src` and `alt`

`src` gives the browser something to fetch and `alt` keeps the image accessible. `width` and `height` are optional sizing attributes.

Topper level · 5 questions

Q14. A student writes this and the indentation breaks: ```html <ul> <li>Fruits</li> <ul> <li>Apple</li> </ul> </ul> ``` What is the mistake?

Advanced
A The inner `<ul>` must sit inside the outer `<li>` B The inner `<li>` tags must be removed entirely C The inner list should use `<ol>` instead of `<ul>` D The outer `<ul>` must be replaced by `<li>`
Show answer & explanation

The inner `<ul>` must sit inside the outer `<li>`

A nested list must be placed inside an `` element, not between two `` tags. Closing the outer `` before the inner list breaks the structure.

Q15. A link reads `<a href="#">click here</a>`. Which statement best explains why this is poor practice?

Advanced
A The `#` symbol is not allowed inside `href` B The `href` attribute must always be a full URL C Anchor tags cannot contain plain text between them D The link text tells a screen reader nothing about its destination
Show answer & explanation

The link text tells a screen reader nothing about its destination

A link that says "click here" gives no information about where it goes. `href` may hold a URL, a file path, or an anchor.

Q16. A developer builds a list using `<br>` tags between items instead of `<ul>` and `<li>`. What is the main consequence?

Advanced
A The text will render as an image instead of a list B The browser will automatically convert it to `<ol>` C The items will not appear on the page at all D The list loses its semantic meaning for assistive technology
Show answer & explanation

The list loses its semantic meaning for assistive technology

Writing real ``, `` and `` tags is what lets assistive technology, search engines and other programs understand the page. `` gives visual breaks but no structure.

Q17. Given the following HTML snippet, identify the issue with the nesting of lists and suggest a correction: ```html <ul> <li>Fruits <ul> <li>Apple</li> </li> <li>Vegetables</li> </ul> ```

Advanced
A The outer `<li>` is incorrectly closed before the inner `<ul>` starts. B The inner `<ul>` is correctly placed inside an `<li>`. C The `<ul>` should be an `<ol>` for proper ordering. D The list items should not contain any nested lists.
Show answer & explanation

The outer `<li>` is incorrectly closed before the inner `<ul>` starts.

The outer `` is incorrectly closed before the inner `` starts, which breaks the structure. The correct nesting should have the inner `` entirely contained within the outer ``.

Q18. Analyze the following HTML code and determine what will happen when a user clicks the link: ```html <a href="mailto:info@example.com">Contact Us</a> ```

Advanced
A The link will download a file named info@example.com. B The link will redirect the user to a new webpage. C The link will display an error message in the browser. D The link will open the user's email client with a new message addressed to info@example.com.
Show answer & explanation

The link will open the user's email client with a new message addressed to info@example.com.

The `mailto:` scheme in the `href` attribute will open the user's default email client with a new message addressed to info@example.com, allowing the user to send an email.

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free, in 42 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Exam prep

Get Veda free See what students get

Free to start · No ads · Works in 42 languages