Creating AnchorsGenerally, a click on 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, you have to create an anchor and then reference that anchor in the link. To create an anchor:
Figure 6.8. Notice that most of the anchors are created with the a element and name attribute, while the last is created by simply adding an id attribute to the existing h2 element (see first tip). The id attribute does double duty as an anchor in all but the oldest browsers.
Tips
|