Does the <li> tag always have to be nested within the <ul> tag?


#1

Question

Does the <li> tag always have to be nested within the <ul> tag?

Answer

The <li> element can be a direct child of either the <ul> or the <ol> elements but it should never exist outside of either of these parent elements.


FAQ: Learn HTML Elements - Intro to HTML - Unordered Lists
#2

the

  • tag will be placed inside the
      tag because the
    • tag mean listed items and that helps you organize your unlisted items.
    • help organize all of the items after the unlisted items.