Text & Content Lesson 14 of 33
Styling Lists with CSS — Bullets, Numbers and Menus
Change list bullets and numbering, use custom markers and emojis, remove bullets for menus, and build a styled checklist with CSS.
Lists are everywhere on websites: menus, step-by-step instructions, product features, to-do lists. HTML gives you <ul> (bullets) and <ol> (numbers). CSS lets you change how those bullets and numbers look, or remove them completely.
list-style-type
Changes the marker in front of each item.
<style>
ul, ol { font-family: Arial, sans-serif; margin-bottom: 14px; }
</style>
<ul style="list-style-type: disc;"><li>disc (default for ul)</li></ul>
<ul style="list-style-type: circle;"><li>circle</li></ul>
<ul style="list-style-type: square;"><li>square</li></ul>
<ol style="list-style-type: decimal;"><li>decimal (default for ol)</li><li>two</li></ol>
<ol style="list-style-type: upper-roman;"><li>upper-roman</li><li>two</li></ol>
<ol style="list-style-type: lower-alpha;"><li>lower-alpha</li><li>two</li></ol>
upper-roman (I, II, III) is useful for outlines and reports. lower-alpha (a, b, c) is great for multiple-choice options in a quiz.
Removing bullets
list-style: none removes the markers. That's the first step in turning a list into a navigation menu or a set of cards. Browsers also add padding on the left of lists (to make room for bullets), so you usually remove that too:
.menu {
list-style: none;
padding: 0;
margin: 0;
}
Styling the marker with ::marker
The ::marker selector targets the bullet or number itself, so you can change its color and size without affecting the text:
<style>
li { font-family: Arial, sans-serif; font-size: 18px; }
li::marker { color: #CE1126; font-weight: bold; }
</style>
<ol>
<li>Wash the rice</li>
<li>Add water up to the first line of your finger</li>
<li>Cook until the rice cooker clicks</li>
</ol>
Emoji and text markers
list-style-type can also be any text in quotes, including emojis:
<style>
.packing { list-style-type: "✅ "; font-family: Arial, sans-serif; font-size: 18px; }
.packing li { margin-bottom: 6px; }
</style>
<h3>Field trip checklist</h3>
<ul class="packing">
<li>Parent's permit (signed)</li>
<li>Packed lunch and water</li>
<li>₱150 allowance</li>
</ul>
Image markers
list-style-image: url("star.svg"); uses a small image as the bullet. It's hard to control the size and position, so many developers instead remove the bullets and add an icon with ::before (covered in the Pseudo-elements lesson).
list-style-position
By default, markers sit outside the text block. With inside, they sit inside, and wrapped lines go under the marker:
<style>
ul { width: 260px; border: 1px solid #ccc; font-family: Arial, sans-serif; }
</style>
<ul style="list-style-position: outside;">
<li>outside: this long item wraps to a second line, and the text lines up neatly.</li>
</ul>
<ul style="list-style-position: inside;">
<li>inside: this long item wraps to a second line, under the bullet.</li>
</ul>
Spacing list items
Add a little space between items to make lists easier to read and tap:
li { margin-bottom: 8px; }
li:last-child { margin-bottom: 0; } /* no extra space after the last one */
Project: a styled list of steps
<style>
.steps { list-style: none; padding: 0; counter-reset: step; font-family: Arial, sans-serif; max-width: 420px; }
.steps li {
counter-increment: step;
position: relative;
padding: 10px 12px 10px 52px;
margin-bottom: 10px;
background: #f3f6f4;
border-radius: 10px;
}
.steps li::before {
content: counter(step);
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
width: 30px;
height: 30px;
border-radius: 50%;
background: #0f5c4d;
color: white;
display: grid;
place-items: center;
font-weight: bold;
}
</style>
<h3>How to load your prepaid card</h3>
<ol class="steps">
<li>Scratch the back of the card to see the code.</li>
<li>Open your phone's dialer.</li>
<li>Type the load code your network gives, then the card number.</li>
<li>Wait for the confirmation text message.</li>
</ol>
This example uses some things you haven't learned yet: CSS counters, ::before, and positioning. Don't worry about understanding every line yet. Come back to it after the Position and Pseudo-elements lessons. For now, try changing the colors and the text.
Lists as menus
Navigation menus are usually built as lists, because a menu is a list of links. That's good for screen readers, which announce "list, 4 items". The CSS removes the bullets and lines the items up horizontally. You'll do this properly with Flexbox:
<nav>
<ul class="menu">
<li><a href="/">Home</a></li>
<li><a href="/lessons">Lessons</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
Quick Quiz
Check what you learned. Walang grade ito, practice lang. 🙂
By Sir Reyel · Last updated 2026-12-04