New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Is it mandatory to put a closing tag(</li>) in lists(ordered or unordered)?
3 Answers
+ 4
Shahboz Razzoqov Yes otherwise other list may affect.
+ 4
Yes it's mandatory to have a closing tag.
+ 1
Shahboz Razzoqov
Yes it is, as per this spec sheet :
https://html.spec.whatwg.org/multipage/syntax.html#void-elements
(Void elements can't have any contents (since there's no end tag, no content can be put between the start tag and the end tag)) <-- given in the same page.