How to set a custom bullet symbol for li elements in a ul that is a regular character with CSS?

Spread the love

Sometimes, we want to set a custom bullet symbol for li elements in a ul that is a regular character with CSS.

In this article, we’ll look at how to set a custom bullet symbol for li elements in a ul that is a regular character with CSS.

How to set a custom bullet symbol for li elements in a ul that is a regular character with CSS?

To set a custom bullet symbol for li elements in a ul that is a regular character with CSS, we set the list-style-type property.

For instance, we write

<ul>
  <li>item</li>
  <li>item</li>
  <li>item</li>
  <li>item</li>
</ul>

to add the ul element.

Then we write

ul {
  list-style-type: "🔔";
}

to set the bullet to a bell with list-style-type: "🔔";.

Conclusion

To set a custom bullet symbol for li elements in a ul that is a regular character with CSS, we set the list-style-type property.

Leave a Reply

Your email address will not be published.