Ordered lists (ol and li), online
Six activities your students do on their own devices. See who's finished, and their scores.
Ordered lists (ol and li) in one minute
What students need to know
The browser renders 1. Step one, 2. Step two. Inserting a new item renumbers everything automatically. Recipe steps must happen in order, so <ol> is the semantically correct choice over <ul>.
<ol> creates an ordered (numbered) list. <ul> creates an unordered (bulleted) list. Each item must be wrapped in <li>...</li> - the same element used in unordered lists. There is no <step> element.
Mistakes students make
- HTML tag names must be lowercase. <OL> should be written as <ol>.
- The first list item is missing its closing tag. It should be <li>Crack eggs</li> with </li> at the end.
- HTML tag names must be lowercase. <LI> and </LI> should be written as <li> and </li>.
- The </ol> closing tag appears before the third list item, ending the list too early. Move </ol> after the last <li>.
What students will learn in this module
Every question in Module 19
Quick questions
- Which element creates a numbered list in HTML?A<ul>B<ol>
- What element wraps each item inside an <ol>?A<step>B<li>
- When should you choose <ol> over <ul>?AWhen the order of items mattersBWhen you want bullet points
- True or false: you must type the numbers 1, 2, 3 yourself inside each <li>.AFalseBTrue
- True or false: <OL> with capital letters is valid HTML.AFalseBTrue
Key terms
Students type the meaning of:
<ol>
Match the pairs
<ol> <li>Mix flour</li> <li>Add eggs</li> </ol>Match it to what it does
<ol> <li>Bronze</li> <li>Silver</li> <li>Gold</li> </ol>Match it to what it does
<ol> automatically numbers its items - the numbers update when items changeMatch it to what it doesUse <ol> when order matters and <ul> when it does notMatch it to what it does<ol> <li>First step<li> <li>Second step</li> </ol>Match it to what it does
<ol> <p>Step one</p> <li>Step two</li> </ol>Match it to what it does
Fill in the blanks
<___> <li>Preheat oven</li> <li>Mix batter</li> </ol>
Hint: Type the element name that creates a numbered ordered list
<ol> <___>Crack eggs</li> <li>Whisk</li> </ol>
Hint: Type the element name used for each step in the list
<ol> <li>Wash hands</___> <li>Cook</li> </ol>
Hint: Type the element name for the closing tag of a list item
<ol> <li>Start</li> <li>Finish</li> </___>
Hint: Type the element name for the closing tag that ends the ordered list
<h2>Steps</h2> <___> <li>Mix</li> <li>Bake</li> </ol>
Hint: Type the element that numbers these recipe steps in sequence
Spot the error
Question 1
A<OL>B <li>Preheat oven</li>C <li>Mix batter</li>D</ol>
Question 2
A<ol>B <li>Crack eggs<li>C <li>Whisk well</li>D</ol>
Question 3
A<ol>B <li>Step one</li>C <LI>Step two</LI>D <li>Step three</li>E</ol>
Question 4
A<ol>B <li>First</li>C <li>Second</li>D </ol>E <li>Third</li>
Question 5
A<h2>Recipe steps</h2>B<ol>C <li>Preheat the oven</li>D <li>Mix the ingredients</li>E <p>Bake for 30 minutes</p>F</ol>
