List or longer code snippet inside paragraph
When writing about algorithms, it is often very convenient to write some (pseudo)code inside a paragraph, or even in the middle of a sentence . To visually support the structure of a more complex sentence, lists come handy too. Obviously, one sentence must not be split across different paragraphs. But in our case it has to be due to HTML nesting rules. Paragraph is the p element , which cannot contain block-level elements . Unfortunately for our case, pre and lists are block-level . If I do not obey the spec and include pre or ol / ul / dl in a p , the p is automatically closed right before