spacing between list items


margin-bottom: ***;

Browser
Internet Explorer Firefox Opera

The margin-bottom property sets the bottom margin of an element.

When you apply this property to the LI element, the spacing between list items can be adjusted.


li {
margin-bottom: 5px;
}


Property Value Explanation
margin-bottom length, %, or auto the bottom margin

Example

<html>
<head>
<title>TAG index</title>

<style type="text/css">

#example li {
margin-bottom: 10px;
}

</style>

</head>
<body>

<ul>
<li>First list item</li>
<li>Second list item</li>
<li>Third list item</li>
</ul>

<ul id="example">
<li>First list item</li>
<li>Second list item</li>
<li>Third list item</li>
</ul>

</body>
</html>
Output
  • First list item
  • Second list item
  • Third list item
  • First list item
  • Second list item
  • Third list item