O'Reilly logo

Web Programming with HTML5, CSS, and JavaScript by Dean

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

6.2 a Element

To implement a link, you’ll need to use the a element. Here’s an example a element that implements a link to Park University’s website:

<a href="http://www.park.edu">Park University</a>

The text that appears between an a element’s start tag and end tag forms the link label that the user sees and clicks on. So in this code, the link label is “Park University.” By default, browsers display link labels with underlines. So this code renders like this:

  • Park University

The blue color indicates that the linked-to page has not been visited. We’ll discuss visited and unvisited links later on.

When the user clicks on a link, the browser loads the resource specified by the href attribute. For this example, the “resource” is another web ...

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