A hypertext link is a word, phrase, or image that points to another web resource. Click it, and the browser takes you there—like a friendly signpost with somewhere to go. section 1.1
HTML creates a link with an <a> element and an href attribute containing the destination address. The browser renders the result as something people can select. section 16.32 section 1.1
Links can point in three useful directions:
- Remote links lead to web pages outside your site. section 16.32
- Local links lead to other pages on your site. section 16.32
- In-page links jump to another section of the current page by targeting an identifier, such as #benefits. section 16.35
A tiny gallery signpost
<nav> <a href="gallery1.html">Gallery 1</a> <a href="gallery2.html">Gallery 2</a> </nav> These links move between gallery pages. CSS can make them fit the surrounding design with color: inherit, while a current-page class can show which page is open. section 15.23
Jump within a page
<a href="#benefits">Benefits</a> <h2 id="benefits">Benefits</h2> The href points to the matching id, so selecting Benefits moves the reader to that heading. section 16.35
<nav>
<ul>
<li><a href="gallery1.html">Gallery 1</a></li>
<li><a href="gallery2.html">Gallery 2</a></li>
<li><a href="gallery3.html">Gallery 3</a></li>
<li><a href="gallery4.html">Gallery 4</a></li>
</ul>
</nav>
Explore a complete navigation list linking four gallery pages. section 15.23








