--- url: "https://web.dev/learn/html/navigation" titulek: "Navigation | web.dev" h1: "Navigation Stay organized with collections Save and categorize content based on your preferences." popis: "Navigation is a key element of any site of application, and it starts with HTML." jazyk: "en" kanonicka: "https://web.dev/learn/html/navigation" drobecky: ["web.dev", "Resources", "HTML"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 00:55:11" znaku: 14334 slov: 2283 kodovani: "iso-8859-2" sha256: "66a3d21b1c7b0f1ce7ef8fdf7d1d1b0c2f3759c00840ea7883acc6132d1405d6" --- Navigation Stay organized with collections Save and categorize content based on your preferences. As you learned in [links](/learn/html/links), the `` element with the `href` attribute creates links that users can follow by clicking or tapping. In [lists](/learn/html/lists), you learned how to create lists of content. In this module, you discover how to group lists of links together to create navigation. There are several types of navigation and several ways to display them. Named anchors within text that link to other pages within the same website are considered local navigation. Local navigation that consists of a series of links, displaying the hierarchy of the current page in relation to the site's structure, or the pages the user followed to get to the current page, is called a breadcrumb. A page's table of contents is another type of local navigation. A page containing hierarchical links to every single page on a site is called a site map. The navigation leading to the top-level pages of the website, which is likely found on every page, is called *global navigation*. Global navigation can be displayed in several different ways, including navigation bars, drop-down menus, and flyout menus. The same site may display its global navigation differently, depending on the viewport size. Always make sure users can navigate to any page on your site with the fewest number of clicks, while making sure the navigation is intuitive and not overwhelming. That said, there are no specific requirements for navigational elements. [MachineLearningWorkshop.com](https://machinelearningworkshop.com), being a single-page website, has a local navigation bar in the top right; this is where multi-page sites often put their global navigation. If you visit this page on web.dev, you can spot a few navigational features. There is a breadcrumb above the title, a Learn HTML table of contents and, depending on the width of your screen, an "on this page" table of contents. "Skip to content" link Some sites feature a "skip to content" link, often as the first element in the focus order. It may look something like: `` When clicked or when it has focus and the user hits `Enter`, it scrolls the page and gives focus to the element with a `main` ID, presumably the main content. `
` For improved usability and accessibility, it's important to let users bypass the blocks of content that are repeated on every page, such as a shared heading and main navigation items. With a skip link, when a keyboard user hits `tab`, they can quickly go to the new content on the page. This lets them avoid having to tab through an extensive menu. Most designers don't like the appearance of having such a link at the top of the page. It's fine to hide that link from view. However, remember that when the link gets focus, which happens when a keyboard user tabs through the link on the page, the link must be visible to the user. Only hide content in a non-focused and non-active state using a selector similar to `.visually-hidden:not(:focus):not(:active)`. Like all link text, the name should clearly indicate where the link takes the user. The link target should be the beginning of the page's main content. Table of contents The first element of our main content is the `

` heading with the title of this page: `

Navigation

`. The main heading is followed by a brief description of the contents of this tutorial. The table of contents is always visible. On smaller screens, the table of contents appears after the heading. On larger screens, it's presented in a right-aligned sidebar. The best element to use for navigation sections is `