While importing old LQT threads to Flow in preparation for disabling LQT on mediawiki.org I have run into some old wikitext that generates invalid HTML5.
The simplest version of this error is:
<small> * i broke it </small>
This results in the following HTML:
<!DOCTYPE html> <html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/"><head prefix="mwr: http://en.wikipedia.org/wiki/Special:Redirect/"><meta property="mw:articleNamespace" content="0"/><meta property="mw:parsoidVersion" content="0"/><link rel="dc:isVersionOf" href="//en.wikipedia.org/wiki/"/><title></title><base href="//en.wikipedia.org/wiki/"/><link rel="stylesheet" href="//en.wikipedia.org/w/load.php?modules=mediawiki.legacy.commonPrint,shared|mediawiki.skinning.elements|mediawiki.skinning.content|mediawiki.skinning.interface|skins.vector.styles|site|mediawiki.skinning.content.parsoid&only=styles&skin=vector"/></head><body data-parsoid='{"dsr":[0,30,0,0]}' lang="en" class="mw-content-ltr sitedir-ltr ltr mw-body mw-body-content mediawiki" dir="ltr"><small data-parsoid='{"stx":"html","dsr":[0,30,7,8]}'> <ul data-parsoid='{"dsr":[8,21,0,0]}'><li data-parsoid='{"dsr":[8,21,1,0]}'> i broke it!</li></ul> </small></body></html>
Which gets the following error from w3c validator:
Element ul not allowed as child of element small in this context. (Suppressing further errors from this subtree.)