From the course: Practical HTML for No-Coders

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Understanding nesting lists

Understanding nesting lists

- [Instructor] It's possible that you'll want to have a few layers of lists. When your bullets have bullets, it's time to think about a nested list. Nested lists aren't hard to code. You're going to code two lists, basically speaking. You just need to place the second list inside of the first. And there's one very important trick to doing that. So let's go through how we might code a nested list. In this case, we have information here about the H+ power protein bars. And, you see here, we have three flavors of these bars: Peanut Butter, Lemon, and Chocolate. And they have different allergens that are associated with these particular flavors. In the case of Peanut Butter and Chocolate, we have Soy and Peanuts as the allergens. And for Lemon, our allergens are Eggs and Milk. So, this would be an unordered list. It doesn't matter what order the flavors of protein bar go in. It doesn't matter what order the allergens go in.…

Contents