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).

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

Navigation systems

SystemDescriptionGood for
Horizontal menuLinks in a row across the top. A horizontal scroll menu lets the row scroll sideways on narrow screens instead of wrappingSites with a few main sections; scroll menus suit many categories on phones
Vertical menuLinks stacked in a column, usually at the sideMany sections or long labels; sub-menus can indent below
Dropdown menuSub-links appear below a main item on hover, focus or clickLarge sites with sub-sections, keeping the top menu short
BreadcrumbA trail showing where the page sits in the site: Home > Classes > YogaDeep sites; users can see where they are and go back up a level
Button groupRelated buttons joined together in a rowSwitching 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.

  1. A horizontal menu for the 5 main sections keeps the top short.
  2. Dropdowns give access to the sub-pages without extra clicks.
  3. 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.

Key idea: Horizontal and vertical menus list the main sections; dropdowns reveal sub-pages; breadcrumbs show the path from the home page; button groups join related actions. Build menus from ul lists in a nav; keep them consistent, keyboard and touch accessible.

Check yourself

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.