Does <li> always need to be nested between <ul> and <ol>?

Does <li> always need to be nested between <ul> and <ol>?
0

#1

I am doing the 4th challenge in FCC and I notice the author in the pen sometimes uses an ’ li ’ without the above parents under a’ section’ element. What other elements do you not have to use the parent elements ’ ul ’ and ’ ol '? I know there is some debate when it comes to ’ nav '.


#2

Doing that is a bad practice. it will be considered an invalid markup and won’t pass the W3C Markup Validation Test.

The only permitted parent element for <li>s are: <ul>, <ol> and <menu>

Source: W3C: HTML: the markup language.