O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Anchors

Generally, activating a link brings the user to the top of the corresponding Web page. If you want to have the user jump to a specific section of the Web page, create an anchor and reference that anchor in the link Image.

Image Each link href value that begins with # anchors to the element with the corresponding id (sans the #). For instance, <a href="#rising-action">Rising Action</a> anchors to <h2 id="rising-action">Rising Action</h2>. You may apply an id to any element as long as any given id exists in a page only once (see “Naming Elements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required