html · level 2 · unit 5 · lesson 3
- meet it
- guess first
- your turn
- fix it
- nailed it
Tap a green word if you get lost.
meet it
A pairs each term with its details.
Some facts come in pairs: a question and its answer, a word and its meaning, or Parking and Free after 6pm. A description list holds pairs like these. Wrap it in <dl>.
Each pair is a <dt>, the term being described, followed by a <dd>, its description. Browsers push each <dd> in from the left, under its <dt>.
Use one for common questions, a glossary or the details of a product. When the items are not pairs, use <ul> instead.
<dl>
<dt>Opening hours</dt>
<dd>Monday to Friday, 9am to 5pm</dd>
<dt>Parking</dt>
<dd>Free after 6pm</dd>
<dt>Dogs</dt>
<dd>Welcome on a lead</dd>
</dl> Press show my page to see it here.
Read dt as description term and dd as description details.
guess first
How will this list look?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
<dl>
<dt>Is there Wi-Fi?</dt>
<dd>Yes, and it is free.</dd>
<dt>Can I bring my bike?</dt>
<dd>Yes, there are racks by the door.</dd>
</dl>
your turn
Your turn. Answer one more question.
Add a third pair on lines 6 and 7: a question in <dt> and its answer in <dd>. Pick any question a visitor might ask.
Press show my page to see it here.
- there are three questionsnot checked yet
- each question has an answernot checked yet
- your answer comes after your questionnot checked yet
fix it
The answers look like questions. Can you fix it?
Press show my page to see it here.
- only the questions are termsnot checked yet
- each answer is a descriptionnot checked yet
- Every line sits against the left edge. Which lines are answers?
- Answers are descriptions, so they need
<dd>, not<dt>. - On lines 3 and 5, change
<dt>and</dt>to<dd>and</dd>.
nailed it
your facts come in neat pairs. :D
<dl>holds a list of pairs.<dt>is the term, and<dd>describes it.- Browsers push each
<dd>in under its term.
new words in your collection
- description list
This lesson isn’t saved. A free account remembers every lesson you finish.