Can a span be a child of an ul and a parent of a li?
From the HTML specs, a li
must be a child of an ul
, ol
or menu
.
Permitted parents: An <ul>, <ol>, or <menu> element. Though not a conforming usage, the obsolete <dir> can also be a parent.
I need a span between an ul
and a li
:
This does not throw any warnings or errors, but is it correct?
No. See the docs related to permitted content at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul (and the ones you posted yourself).