0

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

HTML

15th Sep 2018, 3:51 AM
Ricardo Prato
Ricardo Prato - avatar
2 Answers
+ 5
li : List item ul, ol : Unordered list, ordered list A list item belongs to a list, one without would be an orphan, I prefer to write it along : )
15th Sep 2018, 6:20 AM
Ipang
+ 2
no, it doesn't. If you just write something like this <li>Hello, world!</li> it will just output as an unordered list
15th Sep 2018, 4:56 AM
Roel
Roel - avatar