HTML4 HTML5
Used to create custom lists of items constituting a menu or toolbar[cite: 3]. In modern HTML, it works almost identically to an unordered list <ul>, but carries additional semantic meaning – informing screen readers and browsers that the <li> elements inside represent a set of commands or selectable options[cite: 3].
Both opening and closing tags are mandatory[cite: 3].
Attributes: Universal attributes such as class, id, and style are mainly used[cite: 3].
Code:
The browser will interpret this code as follows:
Code:
The browser will interpret this code as follows: