CSS - how to use div element as list?

1 points
Created by:

In this article, we would like to show you how to use div element as a list using CSS.

Quick solution:

div {
    display: list-item;
    list-style-type: circle;


Practical example

In this example, we present how to use div elements as list items with a specified list style type.

// ONLINE-RUNNER:browser;

<!doctype html>

      div {
        display: list-item;
        list-style-type: circle; /*  disc/circle/square/decimal...  */
        margin-left: 1em;

      <div>div 1</div>
      <div>div 2</div>
      <div>div 3</div>

See also

Native Advertising
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂