List Questions with Answers

13 practice questions on List (HTML & CSS) with answers and step-by-step solutions. Try 10 samples below, then practise all 13 free in the AptiNest app.

Sample questions

Question 1Medium

How to remove bullets from nested list?

  1. set the "list-style-type" to "none".
  2. set the "list-style-type" to "remove".
  3. set the "list-style-type" to "empty"
  4. we cannot remove bullets from nested list.

Answer: A. set the "list-style-type" to "none".

Explanation

By setting list style type to none, all bullets are removed from nested list.
Milk
Goat
Cow
Eggs
Free-range
Other
Cheese
Smelly
Extra smelly

Step-by-step solution

  1. Use CSS to target the nested list elements.
  2. Set 'list-style-type' to 'none' for no bullets.
  3. This applies to all levels of nesting in the list.
  4. No other options work for removing bullets from nested lists.
  5. Final answer: set the 'list-style-type' to 'none'.

Why the other options are wrong

  • B. There is no CSS property called 'remove'.
  • C. 'empty' is not a valid value for list-style-type.
  • D. Bullets can be removed from nested lists using CSS.

Tip: Use 'list-style-type: none;' for all levels of nested lists.

Question 2Medium

<dl> comes in conjunction with __ and ____.

  1. <dt> and <dd>
  2. <dp> and <dl>
  3. <dl> and <dt>
  4. None of these.

Answer: A. <dt> and <dd>

Explanation

The <dl> tag is used in conjunction with <dt> (defines terms/names) and <dd> (describes each term/name).

Step-by-step solution

  1. A definition list uses dl.
  2. Inside it, dt marks the term and dd marks the description.
  3. So option A is correct.

Why the other options are wrong

  • B. There is no dp tag.
  • C. Dl is the container itself, not its partner.
  • D. Option A is correct.

Tip: Dl contains dt (term) and dd (description).

Question 3Medium

Unordered list is shown by which tag?

  1. <ul>
  2. <ol>
  3. <li>
  4. None of these

Answer: A. <ul>

Explanation

<ul> is the tag for an unordered (bulleted) list. <ol> is for ordered (numbered) lists, and <li> marks a single list item.

Step-by-step solution

  1. Ul stands for unordered list, and its items are shown with bullets.
  2. Ol makes a numbered list, and li is only one item.
  3. So the correct answer, option A (ul), is the tag for an unordered list.

Why the other options are wrong

  • B. Ol makes an ordered (numbered) list.
  • C. Li is one list item, not the whole unordered list.
  • D. Ul is correct, so none of these is wrong.

Tip: Ul is unordered with bullets. ol is ordered with numbers.

Question 4Medium

Another name for a bulleted list found on Web pages is called an?

  1. Cardinal list
  2. Ordered list
  3. Alpha list
  4. Unordered list.

Answer: D. Unordered list.

Explanation

Bulleted list has no numbers to show its order so it is called as unordered list.
e.g.
<ul>
<li>Coffee

<li>Milk

</ul>

Step-by-step solution

  1. Bulleted lists do not use numbers or letters for order.
  2. They simply list items with bullets or symbols.
  3. This type of list is called an unordered list.
  4. Unordered list is the correct term for bulleted lists.
  5. Final answer: Unordered list.

Why the other options are wrong

  • A. Cardinal list refers to numbers used in counting.
  • B. Ordered list uses numbers or letters to show order.
  • C. Alpha list is not a standard term for lists.

Tip: Remember: unordered lists use bullets, ordered lists use numbers.

Question 5Medium

ordered list is shown by which tag?

  1. <ul>
  2. <ol>
  3. <li>
  4. None of these.

Answer: B. <ol>

Explanation

<ol> is the tag for an ordered (numbered) list. <ul> is for unordered lists.

Step-by-step solution

  1. An ordered list is numbered and is made with the ol tag.
  2. Option A, ul, is the unordered list tag with bullet points.
  3. Option C, li, marks a single list item.
  4. So the correct answer is option B, ol.

Why the other options are wrong

  • A. Ul makes a bulleted list, not a numbered one.
  • C. Li marks one item and does not make the list numbered.

Tip: Ol is for ordered (numbered) and ul is for unordered (bulleted) lists.

Question 6Medium

Which tag defines description list?

  1. <dt>
  2. <dl>
  3. <dp>
  4. None of these

Answer: B. <dl>

Explanation

A description list is defined using the <dl> tag. The <dl> tag is used to group a set of terms and their corresponding descriptions.

Step-by-step solution

  1. A description list is made with the dl tag.
  2. Option A, dt, marks a term inside the list.
  3. Option C, dp, is not an HTML tag.
  4. So the correct answer is option B, dl.

Why the other options are wrong

  • A. Dt marks a term inside a description list; it is not the list itself.
  • C. Dp is not an HTML tag.

Tip: Dl is the list, dt is the term and dd is the description.

Question 7Medium

What do you mean by nested list?

  1. Putting one list into another list
  2. Removing one list from another list
  3. Creating only one list.
  4. None of these

Answer: A. Putting one list into another list

Explanation

Nesting means putting one list into another list.
like putting an unordered list into another unordered list.
E.g

<ul>
  <li>Coffee

  <li>Tea
    <ul>
    <li>Black tea

    <li>Green tea

    </ul>
  </li>
  <li>Milk</li>
</ul>

Step-by-step solution

  1. A nested list has one list placed inside an item of another list.
  2. The example puts a ul inside an li of another ul.
  3. So the correct answer, option A (putting one list into another), is right.

Why the other options are wrong

  • B. Removing a list from another is the opposite of nesting.
  • C. Creating only one list is not nesting.
  • D. Option A is correct, so none of these is wrong.

Tip: Nested means a list inside a list item.

Question 8Medium

Another name for a numbered list found on Web pages is called an?

  1. Cardinal list
  2. Ordered list
  3. Alpha list
  4. Unordered list.

Answer: B. Ordered list

Explanation

Numbered list has numbers to show its order so it is called as ordered list.

Step-by-step solution

  1. Numbered lists use numbers to show order.
  2. This shows a sequence, so it's called an ordered list.
  3. Ordered list is the correct term for numbered lists on web pages.
  4. The answer is Ordered list.

Why the other options are wrong

  • A. Cardinal list is not a standard term for numbered lists.
  • C. Alpha list refers to alphabetical order, not numbers.
  • D. Unordered list uses bullets, not numbers.

Tip: Remember: numbered = ordered, bullets = unordered.

Question 9Medium

can we set background color to the nested list?

  1. Yes.
  2. No

Answer: A. Yes.

Explanation

We can set background color to the nested list by setting property:-background-color: #036;

Step-by-step solution

  1. HTML allows styling of nested lists using CSS.
  2. Use background-color property on list elements.
  3. Example: li { background-color: #036; }.
  4. This applies to all list items including nested ones.
  5. Thus, setting background color is possible.
  6. Final answer: Yes.

Why the other options are wrong

  • B. Nested lists can be styled with CSS, so a background color can be set on them.

Tip: Use CSS to style nested lists by targeting li elements.

Question 10Medium

Whether definition list is present in html5?

  1. Yes.
  2. No

Answer: A. Yes.

Explanation

HTML5 includes the definition list elements dl, dt, and dd, which are used to create structured definitions. Therefore, a definition list is present in HTML5.

Step-by-step solution

  1. HTML5 keeps the definition list elements dl, dt and dd.
  2. So a definition list is present in HTML5.
  3. Option A, Yes, is the correct answer.

Why the other options are wrong

  • B. No is wrong because dl, dt and dd are present in HTML5.

Tip: dl, dt and dd are the definition list tags in HTML.

Practise all 13 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all HTML & CSS topics · All topics