Last Updated: February 25, 2016
·
509
· wkjagt

No ul, ol in p

After an hour of counting my opening and closing tags, deleting almost all of my markup except the problematic paragraph, and still not being able to solve it, I stumbled upon the astonishing fact that you can't put a list inside a paragraph. So the following is invalid:

<p class="contact-info">
    Willem van der Jagt
    <ul class="links">
       <li><a href="http://www.github.com/wkjagt">GitHub</a></li>
        ....
    </ul>
</p>

This is, apparently, because "a paragraph, in HTML terms, is not a logical concept, but a structural one." (source: whatwg). I should have known, of course, when Chrome kept insisting on putting my ul outside of my p...