Lesson 4 of 14 · 6 min

Links

Links are what make it a web: pages pointing to other pages. A link uses the <a> tag (short for "anchor"):

<a href="https://www.wikipedia.org">Read Wikipedia</a>

Two parts matter:

  • Where it goes. href="https://www.wikipedia.org" is an attribute: extra information written inside the opening tag, as name="value". The href attribute holds the address the link opens.
  • What people click. The text between <a> and </a> is what appears on the page.

Write link text that says where the link goes. "Read Wikipedia" is better than "click here": people who use screen readers often jump from link to link, hearing only the link text.

The address must be complete, starting with https://. Without it, the browser looks for a page inside your own site instead.

Your task

In the paragraph, add a link with the text Visit Bytepic that goes to https://bytepic.dev.

When you've passed the checks, try clicking your link in the preview.

index.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Links</title>
</head>
<body>
  <h1>Places I like on the web</h1>
  <p>
    <!-- Add your link here -->

  </p>
</body>
</html>

Your page

Discussion

Stuck? Ask here. Be kind, and share hints rather than full answers.

Loading the discussion…