All subjects · Information Technology · WIT12 3 hour practical exam on web development with HTML, CSS and JavaScript
Intuitive navigation: horizontal, vertical, dropdown, breadcrumb and button groups
Edexcel IAL Information Technology · WIT12 3 hour practical exam on web development with HTML, CSS and JavaScript
Users must always know where they are and how to get elsewhere. The specification lists five navigation systems (spec 10.3.1).
Navigation systems
| System | Description | Good for |
|---|---|---|
| Horizontal menu | Links in a row across the top. A horizontal scroll menu lets the row scroll sideways on narrow screens instead of wrapping | Sites with a few main sections; scroll menus suit many categories on phones |
| Vertical menu | Links stacked in a column, usually at the side | Many sections or long labels; sub-menus can indent below |
| Dropdown menu | Sub-links appear below a main item on hover, focus or click | Large sites with sub-sections, keeping the top menu short |
| Breadcrumb | A trail showing where the page sits in the site: Home > Classes > Yoga | Deep sites; users can see where they are and go back up a level |
| Button group | Related buttons joined together in a row | Switching views or filters, pagination, tabs |
Building a menu from a list
<nav>
<ul class="menu">
<li><a href="index.html">Home</a></li>
<li class="drop"><a href="classes.html">Classes</a>
<ul class="submenu">
<li><a href="yoga.html">Yoga</a></li>
<li><a href="spin.html">Spin</a></li>
</ul>
</li>
<li><a href="contact.html" aria-current="page">Contact</a></li>
</ul>
</nav>.menu { list-style-type: none; margin: 0; padding: 0; display: flex; }
.menu a { display: block; padding: 10px 16px; text-decoration: none; }
.drop { position: relative; }
.submenu { display: none; position: absolute; top: 100%; left: 0; list-style-type: none; padding: 0; }
.drop:hover .submenu, .drop:focus-within .submenu { display: block; }
.scroll-menu { display: flex; overflow-x: auto; white-space: nowrap; }To make the menu vertical, remove display: flex so the li elements stack. :focus-within opens the dropdown for keyboard users too, not only on hover. overflow-x: auto makes a horizontal scroll menu.
Breadcrumbs and good practice
<nav aria-label="Breadcrumb">
<ol class="crumbs">
<li><a href="index.html">Home</a></li>
<li><a href="classes.html">Classes</a></li>
<li aria-current="page">Yoga</li>
</ol>
</nav>Good navigation is consistent (same place and order on every page), shows the current page, uses clear short labels, works by keyboard and touch (touch screens have no hover, so dropdowns need to open on tap), and collapses into a menu button on small screens.
Worked example
A site has 5 main sections, each with 4 to 8 sub-pages, and some pages three levels deep. Recommend a navigation system.
- A horizontal menu for the 5 main sections keeps the top short.
- Dropdowns give access to the sub-pages without extra clicks.
- Breadcrumbs on the deeper pages show users where they are and let them go back up a level.
Answer: A horizontal menu with dropdowns, plus breadcrumbs on deep pages, collapsing into a menu button on phones.
Check yourself
- What does a breadcrumb navigation trail show?
- Every page on the site
- The path from the home page to the current page
- Pages the user visited in the last week
- The site's search results
Show answer
The path from the home page to the current page. Breadcrumbs show where the page sits in the hierarchy, such as Home > Classes > Yoga.
- Which CSS hides a dropdown sub-menu until its parent item is hovered?
- .submenu { display: block; } .drop:hover .submenu { display: none; }
- .submenu { opacity: 1; }
- .drop { float: none; }
- .submenu { display: none; } .drop:hover .submenu { display: block; }
Show answer
.submenu { display: none; } .drop:hover .submenu { display: block; }. Hide the sub-menu by default and show it on :hover of its parent.
- Why can dropdown menus that open only on hover be a problem?
- Hover makes pages load slowly
- Touch-screen and keyboard users cannot hover, so they may not reach the sub-menu
- Hover only works in one browser
- Dropdowns cannot contain links
Show answer
Touch-screen and keyboard users cannot hover, so they may not reach the sub-menu. Menus should also open on focus or tap.
- A horizontal menu uses `.menu { display: flex; }`. What change makes the list items stack vertically?
- Add float: left to each li
- Add display: inline to each li
- Remove display: flex so the block-level li elements stack
- Add white-space: nowrap
Show answer
Remove display: flex so the block-level li elements stack. li elements are block-level, so without flex they stack.
- Why should the navigation menu be in the same place on every page of a site?
Show answer
Users learn where it is, so they can find their way around quickly without searching for the menu on each page.. Consistency makes navigation predictable (WCAG's Understandable principle): users do not have to relearn the layout.
- Pagination links (1, 2, 3, Next) joined together in a row are an example of which navigation system?
- Breadcrumb
- Vertical menu
- Button group
- Dropdown menu
Show answer
Button group. Related buttons joined in a row form a button group.
- Which declaration lets a long horizontal menu scroll sideways on a phone instead of wrapping onto several lines?
- overflow-x: auto;
- float: left;
- position: fixed;
- display: none;
Show answer
overflow-x: auto;. With white-space: nowrap or flex, overflow-x: auto adds a horizontal scroll.
Sources
- Pearson Edexcel International Advanced Subsidiary/Advanced Level in Information Technology specification (first teaching 2018), Unit 2 Topics 7 to 11
- Pearson qualifications: Edexcel International Advanced Level Information Technology (2018)
Last updated 8 November 2026. Spotted a mistake? Tell us.