Let's read three list patterns: unordered, ordered, and nested lists.
- Start with <ul> when the order of the items does not matter. - Put each item inside its own <li>. - Use <ol> when the order carries meaning, such as steps in a process. - The numbers are generated by the browser, so you do not need to type 1, 2, and 3 yourself. - A nested list starts a new <ul> or <ol> inside a parent <li>. - In <li>Frontend<ul><li>HTML</li><li>CSS</li></ul></li>, Frontend is the parent item and HTML/CSS are its sub-items. - The nested list must be inside the parent <li> so the browser can understand the relationship. - Most browsers visually indent nested lists and often change the bullet shape at deeper levels. - Do not choose <ol> or <ul> only because you like its visual appearance; choose it based on whether order matters.
The practical goal is to understand both the list type and the nesting relationship.
