You was missing the </li> at the end of each list item after the first one
…and those incomplete list items were not being rendered. The reason they appeared inline was because the anchors were being rendered.
By default, anchors are inline elements, hence they are rendered as display:inline;
By default, an LI is rendered as display:list-item; which generates a principal block box and a marker box.
Block boxes (other than inline-block) will stack one upon another.
Thanks, but that’s called a copy and paste error.
It doesn’t answer the behavior I’m seeing.
If you are still seeing them appear beside each other then you have either floated them or set them as display:inline; via CSS.
An un-styled UL will stack as seen in your second description
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Display:list-item</title>
</head>
<body>
<ul id="nav">
<li><a href="#">Men's</a></li>
<li><a href="#">Women's</a></li>
<li><a href="#">Boys'</a></li>
<li><a href="#">Girls'</a></li>
</ul>
</body>
</html>
…and those incomplete list items were not being rendered. The reason they appeared inline was because the anchors were being rendered.
I know you said it was a typo, but actually the browsers were rendering them all as blocks even when the closing </li> was missing on the lower three. They must have been self closing the LI.
You must have styles applied to them if they are sitting beside one another.