Bird
Raised Fist0
HTMLmarkup~20 mins

Unordered lists in HTML - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Unordered List Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ rendering
intermediate
2:00remaining
What is the visual output of this unordered list?
Look at this HTML code for an unordered list. What will you see in the browser?
HTML
<ul>
  <li>Apple</li>
  <li>Banana</li>
  <li>Cherry</li>
</ul>
AA numbered list with 1. Apple, 2. Banana, 3. Cherry
BA bulleted list with Apple, Banana, Cherry each on its own line
CA paragraph with Apple Banana Cherry all in one line
DNo visible output because ul tag is empty
Attempts:
2 left
💡 Hint
Remember, <ul> creates a bulleted list and <li> defines each item.
❓ selector
intermediate
2:00remaining
Which CSS selector targets all items in an unordered list?
You want to style all list items inside any unordered list. Which CSS selector should you use?
Ali > ul
Bli ul
Cul > ul
Dul li
Attempts:
2 left
💡 Hint
Think about selecting list items inside unordered lists, not the other way around.
🧠 Conceptual
advanced
2:00remaining
What is the default marker style for an unordered list in HTML?
When you create an unordered list without any CSS, what kind of bullet marker appears by default?
ASolid circle bullet
BSquare bullet
CNo marker, just text
DNumbered decimal
Attempts:
2 left
💡 Hint
Think about the common bullet style you see in browsers by default.
❓ layout
advanced
2:00remaining
How to remove bullets and indent from an unordered list using CSS?
You want an unordered list with no bullet points and no indentation. Which CSS rules achieve this?
Aul { bullet-style: none; indent: 0; }
Bul { list-style: none; padding: 0; }
Cul { list-style-type: none; padding-left: 0; margin-left: 0; }
Dul { marker: none; margin: 0; }
Attempts:
2 left
💡 Hint
The property to remove bullets is list-style-type, and indentation is controlled by padding or margin.
❓ accessibility
expert
2:00remaining
Which attribute improves accessibility for an unordered list used as a navigation menu?
You have an unordered list used as a navigation menu. Which attribute should you add to improve screen reader accessibility?
HTML
<nav>
  <ul>
    <li><a href="#home">Home</a></li>
    <li><a href="#about">About</a></li>
    <li><a href="#contact">Contact</a></li>
  </ul>
</nav>
AAdd aria-label="Main navigation" to the &lt;nav&gt; element
BAdd tabindex="0" to each &lt;li&gt; element
CAdd alt="navigation" to each &lt;a&gt; element
DAdd role="menubar" to the &lt;ul&gt; element
Attempts:
2 left
💡 Hint
Think about labeling the navigation region for screen readers.

Practice

(1/5)
1. What HTML tag is used to create an unordered list?
easy
A. <li>
B. <ol>
C. <ul>
D. <list>

Solution

  1. Step 1: Understand list types in HTML

    <ul> creates unordered lists with bullet points, while <ol> creates ordered lists with numbers.
  2. Step 2: Identify the correct tag for unordered lists

    The tag <ul> is specifically for unordered lists.
  3. Final Answer:

    <ul> -> Option C
  4. Quick Check:

    Unordered list tag = <ul> [OK]
Hint: Unordered lists always start with <ul> tag [OK]
Common Mistakes:
  • Confusing <ul> with <ol>
  • Using <li> as the list container
  • Using non-standard tags like <list>
2. Which of the following is the correct syntax to create a list item inside an unordered list?
easy
A.
    • Item
  • B.
    • Item
    C.
      Item
    D.
  • Item
  • Solution

    1. Step 1: Identify the correct tag for list items

      List items must be inside <li> tags.
    2. Step 2: Check the correct nesting of tags

      The <li> tags go inside the <ul> tags, not the other way around.
    3. Final Answer:

      <ul><li>Item</li></ul> -> Option B
    4. Quick Check:

      List item inside <ul> uses
    5. [OK]
    Hint: List items always go inside <li> tags within <ul> [OK]
    Common Mistakes:
    • Swapping <ul> and <li> tags
    • Using <item> instead of <li>
    • Using non-standard <list> tag
    3. What will be the visual output of this HTML code?
    <ul>
      <li>Apple</li>
      <li>Banana</li>
      <li>Cherry</li>
    </ul>
    medium
    A. A bulleted list with Apple, Banana, Cherry
    B. An error message because of missing tags
    C. Plain text: Apple Banana Cherry without bullets or numbers
    D. A numbered list with Apple, Banana, Cherry

    Solution

    1. Step 1: Recognize the list type from the tag

      The <ul> tag creates an unordered list which shows bullet points.
    2. Step 2: Understand the list items

      Each <li> creates a bullet point with the text inside it.
    3. Final Answer:

      A bulleted list with Apple, Banana, Cherry -> Option A
    4. Quick Check:

      <ul> = bulleted list [OK]
    Hint: Unordered lists show bullets, ordered lists show numbers [OK]
    Common Mistakes:
    • Confusing <ul> with <ol>
    • Expecting numbers instead of bullets
    • Thinking it shows plain text without bullets
    4. Identify the error in this unordered list code:
    <ul>
      <li>First</li>
      <li>Second
    </ul>
    medium
    A. No error, code is correct
    B. Using <ul> instead of <ol>
    C. Extra closing tag for <ul>
    D. Missing closing tag for the second <li>

    Solution

    1. Step 1: Check each list item tag

      The first <li> has a closing tag, but the second <li> does not.
    2. Step 2: Confirm proper HTML structure

      Every <li> must have a closing </li> tag to be valid.
    3. Final Answer:

      Missing closing tag for the second <li> -> Option D
    4. Quick Check:

      All
    5. tags must be closed [OK]
    Hint: Every
  • needs a closing
  • tag [OK]
    Common Mistakes:
    • Forgetting to close <li> tags
    • Confusing <ul> with <ol>
    • Ignoring missing closing tags
    5. You want to create a nested unordered list where 'Fruits' has sub-items 'Apple' and 'Banana'. Which code correctly achieves this?
    hard
    A.
    • Fruits
      • Apple
      • Banana
    B.
    • Fruits
      • Apple
      • Banana
    C.
    • Fruits
      • Apple
      • Banana
    D.
    • Fruits
    • Apple
    • Banana

    Solution

    1. Step 1: Understand nested list structure

      Nested lists must be inside a list item <li> of the parent list.
    2. Step 2: Check correct nesting in options

      • Fruits
        • Apple
        • Banana
      correctly nests a <ul> inside the <li> for 'Fruits'. Other options either miss closing tags or place nested lists incorrectly.
    3. Final Answer:

      <ul><li>Fruits<ul><li>Apple</li><li>Banana</li></ul></li></ul> -> Option A
    4. Quick Check:

      Nested
        inside
      • for sublist [OK]
    Hint: Put nested <ul> inside a parent <li> tag [OK]
    Common Mistakes:
    • Placing nested <ul> outside <li>
    • Missing closing tags in nested lists
    • Using multiple <li> without nesting
    Recommended

    Ready to prove it?

    Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

    10 questions~5 mineasy hard