0
0
HTMLmarkup~20 mins

Unordered lists in HTML - Practice Problems & Coding Challenges

Choose your learning style9 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.