Preview

06 - Hyperlinks

 1. Links are found in very few web pages (they are very rare). They are also called 'hypolinks'

  TRUE

  FALSE

 2. Links allow users to click their way from page to page. They provide a means of ________________

  copycatting

  navigation

  duplication

  communication

 3. HTML links are hyperlinks. Which of the following statements are true?
Statement 1: You can click on a link and jump to another document.

Statement 2: When you move the mouse over a link, you can create a hover-over effect

Statement 3: A link does not have to be text. It can be an image or any other HTML element.

  Statement 4

  All the statements are true

  Statement 2 and 3

  Statement 1

 4. Look at the following example. The text that is displayed is the link beginning with "https://…." and the URL is the sentence starting with "Learning HTML is…"
<a href="https://www.testandtrack.io">Learning HTML is such fun</a>

  FALSE

  TRUE

 5. Read the following excerpt on hyperlinks and fill in the blanks.
<a href="www.google.com">Google</a>

The href attribute specifies the destination address (www.google.com) 
of the link.

The link text is the _____________ (Google).

Clicking on the link text will send you to the specified address.

  complicated park

  visible part

  hyperlinked (URL) part

  invisible part

 6. Have a look at the code below. What is the difference between the local link and the link to Google?
<!DOCTYPE html>
<html>
<body>

<h2>Local Links</h2>

<p><a href="myhtmlpage.html">HTML Images</a> is a link to a page on this website.</p>

<p><a href="https://www.google.com/">Google</a> is a link to a website on the World Wide Web.</p>

</body>
</html>

  In this case the local link goes to Google. It means it is more secure

  Local links always end in 'html' where as the other links always end in '.com'

  A local link is always much longer

  A local link (link to the same web site) is specified with a relative URL (without http://www....).

 7. What does the following target attribute do (in the context of hyperlinks and HTML)
_blank

  Opens the linked document in the parent frame

  Opens the linked document in the same window/tab as it was clicked (this is default)

  Opens the linked document in a new window or tab

  Opens the linked document in the full body of the window

 8. What does the following target attribute do (in the context of hyperlinks and HTML)
_self

  Opens the linked document in the same window/tab as it was clicked (this is default)

  Opens the linked document in a new window or tab

  Opens the linked document in the parent frame

  Opens the linked document in the full body of the window

 9. What does the following target attribute do (in the context of hyperlinks and HTML)
_parent

  Opens the linked document in the same window/tab as it was clicked (this is default)

  Opens the linked document in the parent frame

  Opens the linked document in a new window or tab

  Opens the linked document in the full body of the window

 10. Analyse this code and explain what will happen.
<!DOCTYPE html>
<html>
<body>

<h2>Can you figure out what's going on here?</h2>

<p>The image is a link. You can click on it.</p>

<a href="https://www.testandtrack.io">
  <img src="smiley.gif" alt="HTML tutorial" style="width:42px;height:42px;border:0">
</a>

<p>We have added "border:0" to prevent IE9 (and earlier) from displaying a border around the image.</p>

</body>
</html>

  The user can use an image and on clicking on it, it will take them to the image path

  The use can click on the image, and the image and the site will be deleted in real time.

  The user can enter a website (like testandtrack.io) and it will display an image

  The user can click on the smiley image and it will take them to https://www.testandtrack.io