Test your skills: Links

The aim of this skill test is to help you assess whether you understand how to implement links in HTML.

Note: To get help, read our Test your skills usage guide. You can also reach out to us using one of our communication channels.

Note: Some of the links in the starting code for these tasks have the target="_blank" attribute set on them, so that when you click on them, they will try to open the linked page in a new tab rather than the same tab. This is not strictly best practice, but we've done it here so that the pages don't open in the MDN Playground output <iframe>, getting rid of your example code in the process!

In this task, we want you to help fill in the links on our Whales information page.

To complete the task, update the links as follows:

  1. The first link should be linked to a page called whales.html, which is in the same directory as the current page.
  2. Give it a tooltip when moused over that tells the user that the page includes information on Blue Whales and Sperm Whales.
  3. The second link should be turned into a link you can click to open up an email in the user's default mail application, with the recipient set as "whales@example.com".
  4. Bonus points if you also set it so that the subject line of the email is automatically filled in as "Question about Whales".

The starting point of the task looks like this:

Here's the underlying code for this starting point:

html

The updated content should look like this:

Click here to show the solution

Your finished HTML should look like this:

html

In this task, we want you to fill in the four links so that they link to the appropriate places.

To complete the task, update the links as follows:

  1. The first link should link to an image called blue-whale.jpg, which is located in a directory called blue inside the current directory.
  2. The second link should link to an image called narwhal.jpg, which is located in a directory called narwhal, which is located one directory level above the current directory.
  3. The third link should link to the UK Google Image search. The base URL is https://www.google.co.uk, and the image search is located in a subdirectory called imghp.
  4. The fourth link should link to the paragraph at the very bottom of the current page. It has an ID of bottom.

The starting point of the task looks like this:

Here's the underlying code for this starting point:

html

The updated content should look like this:

Click here to show the solution

Your finished HTML should look like this:

html

The following links link to an info page about Narwhals, a support email address, and a PDF factfile that is 4MB in size.

To complete the task:

  1. Take the existing paragraphs with poorly-written link text, and rewrite them so that they have good link text.
  2. Add a warning to any links that need a warning added.

The starting point of the task looks like this:

Here's the underlying code for this starting point:

html

We've not provided finished content for this task, as it would give away the solution.

Click here to show the solution

Your finished HTML should look like this:

html
<p>
  We do lots of work with Narwhals. <a href="narwhals.html" target="_blank">Find out more about this work</a>.
</p>

<p>
  You can <a href="mailto:whales@example.com">email our support team</a> if you have any more questions.
</p>

<p>
  You can also <a href="factfile.pdf" target="_blank">download
  our factfile</a> (PDF, 4MB), which contains lots more information, including an FAQ.
</p>