Using Anchors Throughout this book, you have used hyperlinks to navigate the pages in a website. The HTML tag that creates a hyperlink is the anchor tag (). The most common use of a hyperlink is to connect the different webpages in a website. When connecting webpages with a hyperlink, the page that opens when the hyperlink is clicked is called the hyperlink’s target or target page. The webpage that contains the hyperlink is called the source page. The syntax of a hyperlink that connects a source page with a target page is as follows: The tag is a two-sided tag that includes the href attribute, which specifies the filename of the target page. The text “Home Page” indicates the text that will appear as a link in the source page. Most browsers underline hyperlinks and display them in a blue font so they are easy to identify in a webpage. When you click the “Home Page” link, the browser opens the page named “default.html.” A hyperlink can include a URL to another website in the href attribute. When a hyperlink connects to a target page on another web server, the href attribute includes the complete URL, including the HTTP protocol, as follows: In this example, clicking the “Cengage Learning” link on the page causes the browser to open the home page for that company. You can also use the tag to include a hyperlink to a location in the same page. When a hyperlink is used in this way, it is sometimes called a bookmark. A bookmark uses the id attribute to identify locations in a document so that you can create hyperlinks to those locations. A common use of a bookmark is to provide a way of scrolling a long webpage to a specific location, or to provide a link that scrolls a webpage to the beginning of the page. Creating a bookmark requires two steps. The first step is to use the id attribute to name a section in a webpage. For example, you might name the image at the top of the women_sd.html page so that it becomes the “top” of the page. To accomplish this task, you would change the existing tag as follows to add the id attribute to it: To create a hyperlink to the named location, you would insert the following code: The text for the hyperlink can be anything you choose; in this case, “Back to top” is the text that is displayed in the page.