CSS Lists

Markers, custom bullets and list layout.

✍️ 3 exercises + code challenge in this lesson

List properties change how bullets and numbers look:

  • list-style-type: disc, circle, square, decimal, upper-roman, none…
  • list-style-position: inside or outside.
  • list-style-image: use an image as the bullet.

Setting list-style: none plus padding: 0 is the usual start for navigation menus.

Key Takeaways: CSS Lists

Mastering CSS Lists helps you write clean and reliable CSS code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.

CSS Lists Code Example

CSS
<style>
  .square { list-style-type: square; }
  .roman  { list-style-type: upper-roman; }
  .menu   { list-style: none; padding: 0; display: flex; gap: 6px; }
  .menu li { background: #071A2F; color: white; padding: 8px 14px; border-radius: 6px; }
  .check li::marker { content: "✔ "; color: #14B8A6; }
</style>

<ul class="square"><li>Square</li><li>Bullets</li></ul>
<ol class="roman"><li>Roman</li><li>Numbers</li></ol>
<ul class="check"><li>Custom marker</li><li>With ::marker</li></ul>
<ul class="menu"><li>Home</li><li>About</li><li>Contact</li></ul>
Free sign-in required · Google login available

CSS Lists Practice Exercises

Check what you learned in “CSS Lists”.

/ 3 solved
Fill in the blank

Use squares as list bullets.

ul {
  list-style-type: ;
}
✓ Correct! Not quite. Try again.
Multiple choice

Which declaration removes the bullets from a list?

✓ Correct! Not quite. Try again.
Code challenge

Remove the bullets and the left padding from the list.

Write the code in the live editor. Your answer is checked automatically.

Free sign-in required · Google login available

to save your exercise progress.
Finished this lesson?
Mark it complete to track your progress.

Stuck on something?

Ask the community in the CodesInTech forum.

Need a developer?

Learning on your own is great — and when you need professional help, our team builds custom software, websites and mobile apps for clients worldwide.

Explore Our Services