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.