January 2018
Intermediate to advanced
678 pages
20h 16m
English
nav and a ElementsIn this section, we describe another organizational element—nav. The nav element is a container that normally contains links to other web pages or to other parts of the current web page. The nav element gets its name from navigate because you use links to navigate to (jump to) other locations.
Go back to Figure 4.10 and note the two purple links near the top of the web page labeled “Dining” and “Clothing.” Here’s the nav code that contains those links:
<nav> <a href="#dining">Dining</a> | <a href="#clothing">Clothing</a> </nav>
Note the two a elements, each with its own pair of start and end tags. Each a element implements a link. When the user clicks on a link, the browser jumps to the value specified by the href attribute. ...
Read now
Unlock full access