start, reversed, type and value
value resets the count, and the next item continues from it. li.value reads only an explicit value, so the last item reports 0.
HTML has three lists: <ul> when order doesn't matter, <ol> when it does (with start, reversed and type to control the numbers), and <dl> for terms and their descriptions; lists can nest inside list items.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 5 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write a top-5 list of your favourite films, numbered 5 down to 1.
Write a packing list with three bullets, where the item Clothes has its own nested bullet list of Shirts and Socks.
Write a description list for a phone: Screen is 6.1 inches, Battery is 4000 mAh.
Explain it without notes
When do you use <ul>, <ol> and <dl>?
How do you nest a list correctly, and what goes wrong if you don't?
What do start, reversed, type and value do?
Why should a navigation menu be a list?
Preview
Console
Nothing logged yet.Expected console output
start: 5 reversed: true type: A
Last item's value: 0