Your linter should warn you about these. E.g. if you use prettier the first `<p>` will be automatically closed on auto-format before the `<ul>`, and the second (closing) `</p>` will cause a parsing error.
Sometimes we want <ul> inside <p> [1]. It works in DOM, it works in XHTML. And before "you should not want to do it" argument GML (SGML predecessor) had paragraph without indentation so text can continue after list [2].
> The pc tag identifies a paragraph continuation -- that is, one or more sentences related by their subject matter to a paragraph which has been interrupted by an address, example, figure, list, or long quotation.
> Usage: The paragraph continuation can occur after the sequence consisting of a paragraph unit followed by an address, example, figure, list, or long quotation.
:p.The subject of a paragraph might be continued through
:sl
:li.an address, a list,
:li.an example or figure, or
:li.a long quotation, :esl
:pc.and continue to be discussed in flowing text.
The discussion could continue indefinitely through
To long to quote entirely [3], unfortunately IBM destroyed online version