<?xml version="1.0" encoding="utf-8"?>

Nested HTML lists

Nested HTML lists

A list's items can contain any type of content — text, images, multimedia. They can also contain lists — that's right, Inception-style sublists inside of lists! This type of list is described as being "nested."

The trick to marking nested lists correctly is to recognize that the sublist is actually a child of a list item and not a list. Start by creating a list with <ul> or <ol> tag, add items with <li> tags, then start another list inside one of the items. Now, you're good to go!

Top contributors

Marek Lukowski

Topics

From Lesson

Share

Improve your UX & Product skills with interactive courses that actually work