KoderSolution Logo
HomeArticlesTutorialsForumAI LabRun Code
KoderSolution Logo

The world’s most advanced technical ecosystem for modern software engineers. Learn, build, and grow with next-generation developer tools and resources.

Engineering Newsletter

Join 100,000+ engineers receiving curated high-signal content weekly.

Platforms

  • Technical Articles
  • Interactive Tutorials
  • AI Coding Lab
  • Developer Forum
  • Developer Tools

Pages

  • About Us
  • Contact Us
  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Disclaimer
  • Advertisement

Popular Topics

  • PHP
  • Laravel
  • Python
  • React.Js
  • MySQL
© 2026 KoderSolutionAll Rights Reserved
Developed Bymaksudur.dev
🎨

CSS

Topic Hub & Articles

CSS Introduction

10 min

CSS Syntax

10 min

CSS Selectors

10 min

Recap Quiz

5 Questions

CSS How To

10 min

CSS Comments

10 min

Recap Quiz

5 Questions

CSS Colors

10 min

CSS Backgrounds

10 min

CSS Borders

10 min

CSS Margins

10 min

CSS Padding

10 min

CSS Height/Width

10 min

CSS Box Model

10 min

CSS Outline

10 min

Recap Quiz

5 Questions

CSS Text

10 min

CSS Fonts

10 min

CSS Icons

10 min

CSS Links

10 min

CSS Lists

10 min

Recap Quiz

5 Questions

CSS Tables

10 min

CSS Display

10 min

CSS Max-width

10 min

CSS Position

10 min

CSS Overflow

10 min

Recap Quiz

5 Questions

CSS Float

10 min

CSS Inline-block

10 min

CSS Align

10 min

CSS Combinators

10 min

CSS Pseudo-class

10 min

Recap Quiz

5 Questions

CSS Pseudo-element

10 min

CSS Opacity

10 min

CSS Navigation Bar

10 min

CSS Dropdowns

10 min

CSS Image Gallery

10 min

Recap Quiz

5 Questions

CSS Attribute Selectors

10 min

CSS Rounded Corners

10 min

CSS Gradients

10 min

CSS Shadows

10 min

CSS 2D Transforms

10 min

CSS 3D Transforms

10 min

CSS Transitions

10 min

CSS Animations

10 min

CSS Tooltips

10 min

Recap Quiz

5 Questions

CSS Images

10 min

CSS Flexbox

10 min

Recap Quiz

5 Questions

CSS Grid

10 min

CSS Media Queries

10 min

Progress
0%

0 / 46 Lessons

CSSCSS Tutorial
Lesson

CSS Lists

10 min reading
Free Course

CSS Lists: Bullet Styles, Custom Counters, and Navigation Menus

CSS list properties customize unordered (<ul>), ordered (<ol>), and list item (<li>) elements—allowing developers to alter bullet markers, use custom images as markers, or strip bullet formatting to create navigation bars.

List Properties Reference

List properties control marker position, symbol type, and custom imagery:

ul {
    list-style-type: disc;        /* disc | circle | square | none */
    list-style-position: inside;  /* inside | outside (default) */
    list-style-image: url('check.png');
}

/* Shorthand declaration */
ul {
    list-style: square inside;
}

Key list uses:

  1. list-style-type: Alters bullet or numbering symbols (disc, square, decimal, lower-alpha, none).
  2. list-style-position: Determines whether bullet markers appear inside or outside the list item text content box.
  3. Stripping List Styles: Setting list-style: none removes browser bullets when building horizontal navigation bars.

List Marker Positioning

flowchart TD
    A["list-style-position"] --> B["outside (Default: Bullet sits outside text container box)"]
    A --> C["inside (Bullet sits inside text container box, wrapping text underneath)"]

Practical Code Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS Lists Demonstration</title>
    <style>
        /* Horizontal Navigation Menu from <ul> */
        .navbar-menu {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            gap: 1.5rem;
            background-color: #1e293b;
            padding: 1rem 1.5rem;
            border-radius: 8px;
        }
        .navbar-menu a {
            color: #38bdf8;
            text-decoration: none;
            font-weight: bold;
        }
    </style>
</head>
<body style="background-color: #0f172a; color: #f8fafc; font-family: system-ui, sans-serif; padding: 2rem;">

    <h2>Navigation Menu Built from a CSS List</h2>

    <ul class="navbar-menu">
        <li><a href="#">Home</a></li>
        <li><a href="#">Tutorials</a></li>
        <li><a href="#">Docs</a></li>
    </ul>

</body>
</html>

Best Practices

  • Set list-style: none; padding: 0; margin: 0; when building menus: Strips browser default margins and bullet indentations completely.
  • Use CSS Flexbox or Grid for horizontal list items: Combine display: flex; gap: 1rem; on <ul> instead of using legacy float: left.
  • Use SVG icons or ::before pseudo-elements for custom bullets: Offers far better styling control than list-style-image.

Self-Check Challenge

Create a CSS rule for .clean-list that sets list-style: none;, padding: 0;, and margin: 0;!

Save Your Progress

Unlock Your
Full Potential.

Sign in to track your learning journey, earn industry-recognized certificates, and join our elite developer community.

Quick Access With

Enterprise-Grade Security Protocol

Recommended Courses & Books

Try it Yourself

Experiment with the code from this lesson in our interactive playground.

Open Playground
Lesson Recap Quiz Available

Test Your Knowledge

You've completed this section! Take a quick 5-question quiz to check your understanding.

Stuck on this lesson?

Join our community of senior developers.

Ask in Forum