Lists
This page provides a variety of lists to test proper behaviour with browsers and ATs.
Single Level
UL
The first list demonstrates an unsorted list. A peculiarity of UL and OL is that nothing normally goes inside the list tags except list items. If you place anything inside a UL or OL but not within the LI structure, it is still indented, like this use of the phrase "three fruit". Most ATs will treat the phrase "three fruit" as part of the list, and may even label the list using this text, although that isn't part of the specification.- bananas
- apples
- oranges
OL
The second list demonstrates an enumerated list. I'll give you three reasons you use this:- you want to indicate sequence
- you want to rank or otherwise indicate order
- you like numbers better than bullets, even though, as with this list, the numbering is pretty arbitrary
DL
A definition list should be used exclusively for structuring definitions. Unlike the other lists, it consists of a three-part structure. There is the DL, which indicates the beginning and end of a definition list. Unlike OL and UL, text inside the DL but outside the inner tags is not immediately indented.- DT or Definition Term
- The Term is the word or phrase being defined
- DD, or Definition Description
- The DD describes the term. In this example DL, there are two sets of terms and descriptions.
Nested lists
With a nested list, a new UL or OL is put inside an existing UL or OL. As with simple lists, the user agent will handle indentation and bullet variations.Ingredients as nested list
- Wet
- Eggs
- Milk
- Dry
- Flour
- Sugar
- Salt
Instructions as nested list
- Mix dry ingredients
- Put 1 cup flour in bowl
- Add 1 Tbsp sugar
- Ad 1 tsp salt and mix
- Mix wet ingredients
- Measure 1 cup milk
- Add a egg and blend
- Add wet ingredients into dry ingredients
Unordered tasks with ordered tasks nested
- Rake the yard
- Wash the clothes
- Sort the clothes
- Set the washing machine correctly
- Add the detergent
- Start the machine
- Buy the groceries