wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML QUIZ 5

Total questions: 15

Worksheet time: 15mins

Name
Class
Date
1.

Which HTML code correctly links to a section within the same page with the anchor name a1?

a)

<a href="a1">Go</a>

b)

<a href="#a1">Go</a>

c)

<a name="#a1">Go</a>

d)

<a target="a1">Go</a>

2.

Which code correctly defines the destination of an internal hyperlink?

a)

<a id="a1">Section</a>

b)

<a name="a1">Section</a>

c)

<a href="a1">Section</a>

d)

<a target="a1">Section</a>

3.

What will happen if the # symbol is omitted in this code?
<a href="a1">Go</a>

a)

Page refreshes

b)

Link opens a new page

c)

Link will not work as an internal link

d)

Browser crashes

4.

Which attribute determines where the linked document opens?

a)

href

b)

link

c)

target

d)

open

5.

Which value of the target attribute opens the link in a new tab or window?

a)

_self

b)

_parent

c)

_top

d)

_blank

6.

Analyze the code:
<a href="Peta1_ELLE.html" target="_self">Peta 1</a>
What will happen?

a)

Opens Peta1 in a new window

b)

Opens Peta1 in the same window

c)

Opens Peta1 in a new browser

d)

Code is invalid

7.

Which HTML code correctly links to an external website?

a)

<a link="www.google.com">Google</a>

b)

<a href="google.com">Google</a>

d)

<a target="google">Google</a>

8.

Which code correctly uses an image as a clickable hyperlink?

a)

<img href="page.html" src="pic.jpg">

b)

<a src="pic.jpg" href="page.html"></a>

c)

<a href="page.html"><img src="pic.jpg"></a>

d)

<img link="page.html" src="pic.jpg">

9.

Which part of the code below changes the text color of the hyperlink?
<a href="Peta1_ELLE.html" style="color:white;">Peta 1</a>

a)

href

b)

style

c)

Peta 1

d)

<a>

10.

Which code correctly combines opening a link in a new tab AND changing its text color?

a)

<a href="page.html" color="red" target="_blank">Link</a>

b)

<a href="page.html" style="color:red;" target="_blank">Link</a>

c)

<a target="_blank" color="red">Link</a>

d)

<a style="red" target="blank">Link</a>

11.

Which HTML element is responsible for creating ALL types of hyperlinks?

a)

<link>

b)

<href>

c)

<a>

d)

<url>

12.

Which scenario best demonstrates an internal hyperlink?

a)

Linking to Google

b)

Linking to Facebook

c)

Linking to another section of the same page

d)

Linking to another website

13.

What is the function of this code?
<a href="#top">Back to top</a>

a)

Refreshes the page

b)

Scrolls to the bottom

c)

Scrolls to the top of the page

d)

Opens a new page

14.

Which of the following is the MOST COMMON mistake when creating hyperlinks?

a)

Using uppercase letters

b)

Missing quotation marks in href

c)

Using <p> instead of <a>

d)

Adding spaces in text

15.

Why is hyperlink mastery important in website development?

a)

Improves image quality

b)

Allows page navigation and connectivity

c)

Changes page layout

d)

Reduces file size