How to set vertical space between list items with CSS?

Spread the love

Sometimes, we want to set vertical space between list items with CSS.

In this article, we’ll look at how to set vertical space between list items with CSS.

How to set vertical space between list items with CSS?

To set vertical space between list items with CSS, we set the margin of the li elements.

For instance, we write

li {
  margin: 10px 0;
}

to set the vertical margin of the li elements to 10px.

Conclusion

To set vertical space between list items with CSS, we set the margin of the li elements.

Leave a Reply

Your email address will not be published.