I am wondering if <li>
elements semantically allow for block level elements, like figure
, audio
, video
, etc.?
I couldn't find a definitive answer on searching and the W3C guidelines seem to not rule it out. But I also haven't seen examples of rich-text-editors allowing it, or pages having that structure.
A list item's (<li>
) permitted contents are "flow content". Flow content is made up of:
a abbr address area (if it is a descendant of a map element) article aside audio b bdi bdo blockquote br button canvas cite code data datalist del dfn div dl em embed fieldset figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd keygen label main map mark math meter nav noscript object ol output p pre progress q ruby s samp script section select small span strong sub sup svg table template textarea time u ul var video wbr text
So yes, <figure>
, <audio>
, and <video>
are all technically allowed and valid. Whether there is any semantic meaning is up to your specific HTML.