/ TIPS, CSS

How to remove bullets from li (CSS)

This blog post will teach you how to remove bullets from li and ul using CSS code.

By default, browsers add bullets on unordered lists.

To remove bullets from a li with CSS, add list-style-type: none to your code.

For example, to remove bullets for all li and ul on all pages, use this CSS code:

ul {
  list-style-type: none;
}

This code targets the CSS selector “ul”, which selects all HTML tags <ul> - the ones used for unordered lists, and adds the CSS list-style-type: none to remove the bullets.

This is how you get no bullet in li and ul with CSS.

Removing margins and paddings is also useful since browsers usually add that by default. To remove these, add margin: 0; and padding: 0; to the CSS code:

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

ul tags stand for Unordered Lists, while ol tags stand for Ordered Lists (1, 2, 3, etc.).

Have you seen CSS Scan?

Check the CSS of any element you hover over, instantly.

Learn more →

CSS Scan logo