Hacker News new | past | comments | ask | show | jobs | submit login

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

[1] https://www.google.com/search?q=list+inside+paragraph+site%3...

[2] SH20-9160-0 DCF Generalized Markup Language GML Users Guide, First Edition (July 1978)

[3] http://sergeykish.com/gml-element-pc




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: