Build the kind of nested list that many site menus are made from.
What to build
A navigation list of links, one with a sub-list.
Requirements
- An outer
ulwith three directliitems, with these links:Hometo/,Coursesto/courses,Helpto/help. - Inside the
Coursesitem, after its link, a nestedulwith two links:HTMLto/courses/htmlandCSSto/courses/css. - A description list after the menu with one term
HTMLand the descriptionThe structure of a page.
Constraints
A ul may only have li children.
Example
The nested list belongs to the Courses item, so it goes inside that li.
Why it works
Because the inner list is inside its item, a screen reader announces it as part of Courses, and CSS can later turn it into a dropdown.
Hints
Hint 1
The inner ul goes inside the li for Courses, after its link.
Hint 2
Links go inside list items, so li is the parent of a.
Solution
Show one correct solution (try it yourself first)
<ul>
<li><a href="/">Home</a></li>
<li><a href="/courses">Courses</a>
<ul>
<li><a href="/courses/html">HTML</a></li>
<li><a href="/courses/css">CSS</a></li>
</ul>
</li>
<li><a href="/help">Help</a></li>
</ul>
<dl>
<dt>HTML</dt>
<dd>The structure of a page</dd>
</dl>