Using Hyperlinks

An anchor tag, indicated by <a> and </a>, creates a hyperlink to another page location. The browser that displays your Web page creates the underlined link at the point of your HTML's <a> tag.

The following lines send the user to the Que Web site when the user clicks the hyperlink:

<a href="http://www.mcp.com">
Get some great books
</a>

Everything between the <a href> tag and the closing </a> tag comprises the hyperlink. The four words, Get some great books, will be underlined on the Web screen, and the user can click anywhere in that text to move to the corresponding Web site.

You can even specify graphics and multiline text as hyperlinks. When the user clicks the hyperlink, the page changes to the linked Web page. The user ...

Get Absolute Beginner's Guide to Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.